Trustin Lee wrote:
> 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?
I must admit that I didn't know you could use nested properties like
that! That's awesome! Since Spring does support that I don't think
setSessionConfig() is necessary. IMO we can remove it again.

-- 
Niklas Therning
www.spamdrain.net

Reply via email to