You don't need to create your own threads for that (though you could).
>From your component or endpoint (you could simply use servicemix-bean for 
>that),
just create the four JBI exchanges and send them asynchronously.   On each
exchange, set a correlation id (you can use the id of the exchange received).
When you have received all the exchange you need, just aggregate those and
set the out message from the original exchange.
Note that camel or servicemix-eip may help there: they both can do aggregation,
but given that you'll have to split the exchanges yourself, it may be
easier to just
write an endpoint and do the whole.

On Jan 31, 2008 1:31 PM, sachin2008 <[EMAIL PROTECTED]> wrote:
>
> Hi
> I have to develop a  component in servicemix  for the following scenario.
> Can any one let me know how to do this
>
> I have one JBI  component . This JBI component receives requests from other
> components. On receipt of the request, this components has to do the
> following things.
>
> It has to send 4 request s to 4 different JBI components for some XML data.
> Once it receives the response for all the requests it has to merge the
> response into a single NM and then send it back to requested component.
>
> Here the problem is all the 4 requests to other components should be handled
> in a concurrent manner.
> JBI component has to send a request first to another external service .
> Instead of waiting for the response for this request this component has to
> send 2nd request to another external service and then to 3rd one and then to
> 4th one.
>
> Finally this component needs to wait for the responses from all the external
> services and then continue the remaining process as I said earlier.
>
> Note – The flow between the JBI component and external services component
> should be IN-OUT.
>
> Currently we are handling the same scenario by handling threads in servlets.
> Now we need to simulate the same using  servicemix 3.1 + jboss. But I heard
> that in servicemix 3.1 we can't create external threads. I guess beanflow
> component solves this problem.  But I couldn't find enough info on this .
> can anyone please tell me where I can found info regarding this.
>
> --
> View this message in context: 
> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15203567.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to