Lightweight components usually implement the MessageExchangeListener
interface.  In such a case, JBI exchanges will be delivered concurrently
to the component.  Hence, the component has to be thread safe,
like a servlet.  If you implement a full blown JBI component and
don't want to implement MessageExchangeListener, your component
will be responsible for polling the delivery channel and can delegate
the processing to a thread pool.
Note that for file / ftp pollers which use a WorkManager, the work
manager will be retrieved from the jbi container if not specified.

On 10/5/06, dhertzbe <[EMAIL PROTECTED]> wrote:

Hi,

I'm ServiceMix newbie and I have a question about threading. I want my JBI
Component to use multiple threads (one for each "request"). I'm using some
binding components from ServiceMix and some home made.

Does the JBIContainer provide some service that gives me multi threading
automatically? I've seen that there is a WorkManager property on
JBIContainer. Can that be used? I'm using the
org.apache.servicemix.jbi.container.SpringJBIContainer.

In the file-binding example in
apache-servicemix-3.0-incubating\examples\file-binding, a WorkManager is
passed to the FilePoller component. Then the FilePoller schedules work to
the work manager. Is this the way to achieve multi threading?

Regards,
Daniel
--
View this message in context: 
http://www.nabble.com/Threading-question---ServiceMix-3.0-tf2388963.html#a6660201
Sent from the ServiceMix - User mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to