camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From georgiosgeorgiadis <georgiosgeorgia...@yahoo.co.uk>
Subject Camel Mina Thread Pool Daemon mode
Date Wed, 03 Mar 2010 18:37:02 GMT

Hello,

We decided to upgrade Apache Camel from version 1.6.2 to the latest stable
2.2.0. 
What we immediately noticed is that all our 
"from("mina:tcp://....."
routings started exiting immediately (tcp ports closing) and they used to
keep on listening in older versions. After I dag a little bit inside the
MinaComponent class, I found out that after Camel version 2.1.0 the mina
SocketAcceptor is implemented using a cached thread pool executor service:

IoAcceptor acceptor = new SocketAcceptor(processorCount,
ExecutorServiceHelper.newCachedThreadPool("MinaSocketAcceptor", true));

instead of 

IoAcceptor acceptor = new SocketAcceptor(); which was using a single running
Thread prior to 2.1.0.

Currently the isDaemon flag is hard coded to be true in this class, which
means that these threads cannot keep the VM alive if the main VM thread has
returned. Is it possible that this flag (isDaemon) in the MinaComponent be
made configurable via options (preferably in the routing uri)??

Thank you in advance.

best regards

Georgios
-- 
View this message in context: http://old.nabble.com/Camel-Mina-Thread-Pool-Daemon-mode-tp27771974p27771974.html
Sent from the Camel Development mailing list archive at Nabble.com.


Mime
View raw message