If you provide a custom executor service using executorServiceRef
thats a reference to X.
And Camel just uses X as given by the container (usually Spring bean container).

So if you configure Spring to use prototype scope then Spring will
create a new X. If not it will create a shared X.

In Camel you can use ThreadPoolProfiles to setup thread pool settings,
which will be used as a "template" to create thread pools when needed.
So that allows you to easily setup pool boundaries and have each
splitter create their own thread pool instance based on the profile.

Read the documentation
http://camel.apache.org/threading-model.html



On Thu, Mar 31, 2011 at 9:37 AM, Stefan Below <stefanbe...@gmx.de> wrote:
> Hello,
>
> i've found a workaround.
> It looks like that the instance of  the ExecutorService and Splitter are
> stored in the model (RouteDefinition).
> So everything works fine if i create a new instance of the RouteDefinition.
> But i think it should be fixed for consistency (Aggregator and
> AggregatorRepository are not stored in the model)
>>
>> Hi,
>> I am running multiple Camel instances in the same JVM. Each Camel instance
>> should have an unique, custom Executerservice. I set  the Executerservice to
>> the CamelContext registry.
>> But when i start the same route in two different contexts, the
>> executerservice gets shared.... (Same issue with a custom splitter)
>>
>> How can i avoid this?
>>
>> Thanks,
>> Stefan
>>
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to