On 4/27/06, Trustin Lee <[EMAIL PROTECTED]> wrote: > > On 4/26/06, Steven Gong <[EMAIL PROTECTED]> wrote: > > > > I am not familiar with Mina's codebase, but I found something that might > > be > > the root cause of the problem. (the codebase is according to 0.9.3) > > > > In class o.a.m.transport.socket.nio.SocketAcceptorConfig line 39, > there's > > a > > declaration for sessionConfig and it's used in > > o.a.m.transport.socket.nio.support.SocketAcceptorDelegate line 408. The > > listening socket's reuseAddress property is set correctly > > o.a.m.transport.socket.nio.support.SocketAcceptorDelegate.registerNew(), > > but > > it's reset when a new socket session is created in line 408 with the > > 'sessionConfig' which has not been initialized correctly. IMHO the > > 'sessionConfig's properties need to be populated according to > > SocketAcceptorConfig's properties. > > > > I may be wrong but hope this will help. > > > Isn't serversocket's reuseAddress property different from the accepted > socket's reuseAddress property? They just affect different socket objects > IIRC. If you want to set the accepted socket's reuseAddress, you have to > do > the following: > > SocketAcceptorConfig cfg = ...; > cfg.getSessionConfig().setReuseAddress(true); > > To change the server socket property: > > cfg.setReuseAddress(true); > > Please let me know if I am wrong.
So how can I set the behaviour via spring? HTH, > Trustin > -- > what we call human nature is actually human habit > -- > http://gleamynode.net/ > -- > PGP key fingerprints: > * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E > * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6 > > -- Best Regards Steven Gong
