On Fri, Jan 30, 2009 at 3:24 AM, Saptarshi Guha <[email protected]> wrote: > Helllo, > I have written a mina server which uses a JNI interface to a > non-threadsafe library(which has class REngine) > Suppose I receive a connection, depending on the message recieved in > > public void messageReceived(IoSession session, Object message) > > can return in 1 minute or 40 minutes. > Will this prevent other connections from arriving? I was under the > impression that the IoHandlerAdapter subclass is instantiated every
For every NEW Connection, a new session is created, and the filter chain is specific to that session. If you see the construct, you add IoHandler to the Acceptor, so it need not be instantiated for every new connection. New connections shall keep on arriving, as MINA is event based framework. > time a new connection arrives, but this is not true. > What I would really like is to spawn new instance of REngine every > time a new connection arrives. Is MINA appropriate the right thing to > use? Not sure, as you have not shared details about your application. Create the new Engine instance in sessionCreated/sessionOpened event, maintain the instance some where per session. See this page to get an idea about projects using MINA http://mina.apache.org/related-projects.html http://mina.apache.org/testimonials.html >
