Hi Pete, > set the thread model to manual since you add an ExecutorFilter below > I think that if we did not set the ThreadModel is MANUAL, mina will handle the ThreadPools itself. Am I correct?
> > Do I miss any thing? Please advice me. > > also do protocolExecutor.shutdown(); > Why didn't we wrap this kind of code in the unbindAll() method, the same way of SimpleServiceRegistry in mina-0.8.x ? Please advice me once again. Thanks & best regards, Hieu Phan. > -----Original Message----- > From: peter royal [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 07, 2006 12:36 PM > To: [email protected] > Subject: Re: [MINA] Does MINA finish all "decoded messages" before > stopping? > > On Nov 6, 2006, at 8:39 PM, Hieu Phan Thanh wrote: > > --BEGIN-- > > socketConfig = new SocketAcceptorConfig(); > > socketConfig.getFilterChain().addLast("codec", > > new ProtocolCodecFilter(new DataMessageProtocolCodecFactory())); > > socketConfig.setReuseAddress(true); > > set the thread model to manual since you add an ExecutorFilter below > > > > > protocolExecutor = > > Executors.newFixedThreadPool(DCConf.MaxMinaThreadPool); > > socketConfig.getFilterChain().addLast("threadpool", > > new ExecutorFilter(protocolExecutor)); > > add this filter *before* your codec. just do an addFirst here. > > > Do I miss any thing? Please advice me. > > also do protocolExecutor.shutdown(); > > -pete > > > -- > [EMAIL PROTECTED] - http://fotap.org/~osi > >
