camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikunis <miku...@gmail.com>
Subject Threads with non thread-safe beans
Date Sun, 18 Nov 2007 17:37:18 GMT

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

Thanks in advance
-- 
View this message in context: http://www.nabble.com/Threads-with-non-thread-safe-beans-tf4831061s22882.html#a13821436
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message