camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Camel Mina Thread Pool Daemon mode
Date Thu, 04 Mar 2010 13:03:10 GMT
On Wed, Mar 3, 2010 at 7:37 PM, georgiosgeorgiadis
<> wrote:
> 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)??

Well the idea is that your main class should only return when you app
is really shutting down.
So I actually advice you to let your main method keep running.

You can for example leverage MainSupport from camel-core, or simply
just Main from camel-spring.
For example Main from camel-spring supports using ctrl + c to shutdown.

> Thank you in advance.
> best regards
> Georgios
> --
> View this message in context:
> Sent from the Camel Development mailing list archive at

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message