On Thu, Jan 29, 2009 at 10:01 PM, Gregory Brownell <[email protected]> wrote: > Ashish, The following seems to work. Don't know if there are any side > effects yet: > > acceptor = new > NioDatagramAcceptor(Executors.newCachedThreadPool()); > acceptor.setHandler(new DataMonitorHandler(this)); > acceptor.setSessionRecycler(new ExpiringSessionRecycler(150)); > > Initializing the ExpiringSessionRecycler(150) to 150 seconds actually causes > the session to time out after 150 seconds of inactivity. I don't know if > this attaches each IoSession for each client. Any thoughts?
That's it :-) you got it. In the MINA implementation, the constructor that takes timeout is not called, hence the default timeout is being used. Not sure at this moment, but will try to analyze more and see that this configuration is picked from SessionConfig. Thanks!
