mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hieu Phan Thanh" <hie...@Cybersoft-VN.com>
Subject RE: [MINA] Does MINA finish all "decoded messages" before stopping?
Date Tue, 07 Nov 2006 06:24:44 GMT
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:proyal@apache.org]
> Sent: Tuesday, November 07, 2006 12:36 PM
> To: mina-dev@directory.apache.org
> 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
> 
> 
> --
> proyal@apache.org - http://fotap.org/~osi
> 
> 



Mime
View raw message