On 4/5/07, Trustin Lee <[EMAIL PROTECTED]> wrote:
<snip/>

The tough part is setting the default reuseAddr value in MINA 2.0.  In
MINA 2.0, a user can call setSessionConfig(IoSessionConfig) with a new
DefaultSocketSessionConfig instance.  It is especially useful when
Springframework is used to configure the acceptor.  But, when a user
creates a new DefaultSocketSessionConfig instance, the instance itself
can't tell if it will be used for acceptor or connector.  The default
reuseAddr property can't be set correctly at least for one side.

There are three possible solutions:

* Remove setSessionConfig()
* Add a constructor parameter so user can choose
* Provide two classes; ConnectorSocketSessionConfig and
AcceptorSocketSessionConfig

I think the first one is the best for user friendliness if we can
provide proper spring integration.  Any idea on spring integration?
Or, you could tell us what the best solution is.

I found the first one doesn't hurt spring support that much because...

   <property name="sessionConfig.reuseAddress" value="true" />

works! :D

Niklas, what do you think about removing setSessionConfig() and hide
default IoSessionConfig implementations from users like we did for
1.x?

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to