If you use send and not sendSync, they will be sent and processed concurrently.
You may even receive a response before having sent the 4 requests...
You should be able to see that easily if you put a sleep in your lightweight
components.
Btw, the lightweight components are deprecated, so you'd better use
servicemix-bean instead.

On Wed, Mar 5, 2008 at 12:57 PM, sachin2008 <[EMAIL PROTECTED]> wrote:
>
>  Hi ,
>  As per your suggestion i have changed all the inonly exchanges to inout and
>  sending them in an asynchronous fashion.
>
>  But, now the concurent execution is lost and all the 4 requests are being
>  send one after one(i.e after getting resoponse from one request only the
>  subsequent request is being sent)
>
>  Can you please let me know how to achieve parallel execution in this way. I
>  uploaded the JBI component java file also to this.
>
>
>
>
>
>
>
>  sachin2008 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.
>  >
>  >
>  http://www.nabble.com/file/p15848431/ThreadTest.java ThreadTest.java
>
>  -----
>  Cheers
>  Praveen Oruganti
>  "Think before you act and act on what you believe"
>  --
>  View this message in context: 
> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15848431.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Reply via email to