camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dj5483 <>
Subject Re: Thread pool for Camelcontext
Date Tue, 22 May 2012 02:53:28 GMT
I too am implementing a Camel (2.9.1) project on WebSphere ( 
After reading the Camel Docs it was clear to me that I was supposed to
implement the ThreadPoolFactory interface and declare a Spring Bean to allow
Camel to wire in my implementation.  After attempting to implement the
ThreadPoolFactory on my own I began to look for help and found this user
board.  The code that Preben has supplied turned out to be quite useful.  It
seems to me though, that there is a gap in the Camel API.  The
ThreadPoolFactory interface provides methods that operate on a
ThreadFactory.  I believe the ThreadFactory is the appropriate place to tie
into the CommonJ WorkManager, not the ThreadPoolFactory.  The
DefaultExecutorServiceManager uses a private method to create new instances
of a ThreadFactory (CamelThreadFactory).  It seems like the ThreadFactory
should also be able to be injected.  This would allow us to easily override
the mechanism that is creating the individual threads.  Is there something
that I am missing with the ThreadPoolFactory?

Claus Ibsen-2 wrote
> Hi
> You need to implement
> and then configure camel to use your impl on the ExecutorServiceManager
> The latter can be auto detected by Camel if you in the Spring XML file
> just define your custom thread pool factory.
> As these bean types can do that:
> On Tue, Feb 21, 2012 at 3:11 AM, achalam &lt;aadi.chalam@&gt; wrote:
>> Hi,
>> We are using camel 2.9 with Springframework3.0.4 and Websphere 7.1 . How
>> do
>> we configure, the camel, so that we use the managed threads in the
>> application. I know the configuration in spring, to use the workmanager,
>> but
>> somehow, not able to understand how it is done in the context of camel.
>> Thanks,
>> Adi
>> --
>> View this message in context:
>> Sent from the Camel - Users mailing list archive at
> -- 
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@
> Web:
> Twitter: davsclaus, fusenews
> Blog:
> Author of Camel in Action:

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message