On 18/11/2007, mikunis <[EMAIL PROTECTED]> wrote:
> Hello
>
> I have a setting similar to this:
> from("seda:listenForInfos).to("bean:processInfo").to("seda:saveInfo").
>
> As "processInfo" is a long time taking task, I plan on using threads so I've
> changed to this route:
> from("seda:listenForInfos).thread(5).to("bean:processInfo").to("seda:saveInfo").
>
> My drawback is that "processInfo" bean is not thread-safe and it seems all
> threads share the same bean.
>
> Is any way to configure that each thread uses a different copy of my bean?
>
> I'm using Spring and all bean's scopes are declared as prototype

Good catch. We'd unfortunately coded the Bean component and
BeanProcessor so that it looked up the bean once on startup rather
than on each invocation which should be the default (so we can let
Spring use its scope stuff).

I've raised this JIRA to track it...
https://issues.apache.org/activemq/browse/CAMEL-236

and have just patched the code, so trunk (and 1.3) should have this
issue resolved.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to