You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by sachin2008 <es...@gmail.com> on 2008/01/31 13:31:26 UTC

concurrent execution in servicemix

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.


Re: concurrent execution in servicemix

Posted by Guillaume Nodet <gn...@gmail.com>.
So why do you say that the requests are not processed concurrently.
Just try to put a sleep as I suggested and you should see the requests
come back at roughly the same time.

On Wed, Mar 5, 2008 at 2:02 PM, sachin2008 <es...@gmail.com> wrote:
>
>  Hi ,
>  I am using send() only for sending the messages. Please check the  attached
>  file.
>  http://www.nabble.com/file/p15849456/ThreadTest.java ThreadTest.java .
>
>  Once i solve this problem i wil recode the same with servicmix-bean
>  component.
>
>  Does the functionality you are specifying is applicable for servicemix-bean
>  alone. Or it is applicable to LWcontainer also.
>  Now I am trying with Lwcontainer only.
>
>
>
>  -----
>  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-tp15203567s12049p15849456.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Hi , 
I am using send() only for sending the messages. Please check the  attached
file.
http://www.nabble.com/file/p15849456/ThreadTest.java ThreadTest.java .

Once i solve this problem i wil recode the same with servicmix-bean
component. 

Does the functionality you are specifying is applicable for servicemix-bean
alone. Or it is applicable to LWcontainer also.
Now I am trying with Lwcontainer only.


-----
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-tp15203567s12049p15849456.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Whether i can use Aggregate pattern in this regard.

gnodet wrote:
> 
> 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 <es...@gmail.com> 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/
> 
> 

-- 
View this message in context: http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15586309.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Thanks for your reply. 

Where to use the properities like count,index , coorelationid ,addMessage
etc... in aggregator. 

Whether it should be configured in xbean.xml or i should write the java code
for this. 

Please provide the structure for configuring these properities 


gnodet wrote:
> 
> See
> http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-SplitAggregator
> It relies on a few properties that have to be set on the exchange so
> that it can aggregate everything.
> You can also change the expression used if needed, but as you control
> the splitter, I would first try
> to use the default ones which are "count" and "index".
> See
> http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/SplitAggregator.java?revision=602826&view=markup
> 
> On Wed, Feb 20, 2008 at 3:02 PM, sachin2008 <es...@gmail.com> wrote:
>>
>>  Can you provide the configuration details about aggregator for
>> aggregating
>>  two or many exchanges.
>>
>>
>>
>>  gnodet wrote:
>>  >
>>  > Sure there is a way to do that.  You can check the role of the
>> exchange.
>>  >    if (exchange.getRole() == Role.CONSUMER)
>>  >
>>  > if the role is CONSUMER, then it means the exchange has been sent by
>>  > *this*
>>  > component.  If the role is PROVIDER, the exchange has been sent by
>> another
>>  > component to this component.
>>  >
>>  > Btw, even if using an asynchronous call, you could still use an InOut
>>  > pattern,
>>  > which may be simpler in your case, instead of using two InOnlys.
>>  >
>>  > The other solution, as you suspected, it to use a split / aggregator
>>  > pattern (which is
>>  > what you do anyway).  The drawback is that you will have to find a way
>>  > to correlate
>>  > the output of the aggregator to send back the request in the Out
>> message
>>  > to the
>>  > HTTP BC (see http://open.iona.com/issues/browse/ESB-18).
>>  >
>>  > I think the best way to go is to continue using your master endpoint,
>>  > but possibly
>>  > switch to using InOut instead of two InOnlys, and do the aggregation
>> of
>>  > the
>>  > messages inside the master endpoint.
>>  >
>>  > On Wed, Feb 6, 2008 at 1:26 PM, sachin2008 <es...@gmail.com>
>> wrote:
>>  >>
>>  >>  Hi, Thanks for your suggestion.
>>  >>  We have created seperate exchanges and send asynchronous request.
>>  >>  But we have  a small problem here. As we are sendig the requests
>>  >>  asynchronously, component do not wait for the resposne. So , to get
>> the
>>  >>  responses we have used the following approach.
>>  >>
>>  >>  Http BC sends InOut message to the  Master component. Master  sends
>> 4
>>  >>  requestes through different Inonly exchanges to various worker
>> beans.
>>  >> Then
>>  >>  worker beans sends the response back to the master component as
>> another
>>  >>  InOnly exchange but with the same corelation id.
>>  >>  In this scenario, we could not be able to find  whether the message
>> that
>>  >> we
>>  >>  are getting at the master component is from actual BC or from the
>> worker
>>  >>  component.
>>  >>
>>  >>  Is there any one to find which service has send the message to the
>>  >> master
>>  >>  component.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  gnodet wrote:
>>  >>  >
>>  >>  > 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 <es...@gmail.com> 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/
>>  >>  >
>>  >>  >
>>  >>
>>  >>  --
>>  >>  View this message in context:
>>  >>
>> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15306516.html
>>  >>
>>  >>
>>  >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>  >>
>>  >>
>>  >
>>  >
>>  >
>>  > --
>>  > Cheers,
>>  > Guillaume Nodet
>>  > ------------------------
>>  > Blog: http://gnodet.blogspot.com/
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15589649.html
>>
>>
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15626833.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Thanks for your reply. 

Where to use the properities like count,index , coorelationid ,addMessage
etc... in aggregator.

Whether it should be configured in xbean.xml or i should write the java code
for this.


gnodet wrote:
> 
> See
> http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-SplitAggregator
> It relies on a few properties that have to be set on the exchange so
> that it can aggregate everything.
> You can also change the expression used if needed, but as you control
> the splitter, I would first try
> to use the default ones which are "count" and "index".
> See
> http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/SplitAggregator.java?revision=602826&view=markup
> 
> On Wed, Feb 20, 2008 at 3:02 PM, sachin2008 <es...@gmail.com> wrote:
>>
>>  Can you provide the configuration details about aggregator for
>> aggregating
>>  two or many exchanges.
>>
>>
>>
>>  gnodet wrote:
>>  >
>>  > Sure there is a way to do that.  You can check the role of the
>> exchange.
>>  >    if (exchange.getRole() == Role.CONSUMER)
>>  >
>>  > if the role is CONSUMER, then it means the exchange has been sent by
>>  > *this*
>>  > component.  If the role is PROVIDER, the exchange has been sent by
>> another
>>  > component to this component.
>>  >
>>  > Btw, even if using an asynchronous call, you could still use an InOut
>>  > pattern,
>>  > which may be simpler in your case, instead of using two InOnlys.
>>  >
>>  > The other solution, as you suspected, it to use a split / aggregator
>>  > pattern (which is
>>  > what you do anyway).  The drawback is that you will have to find a way
>>  > to correlate
>>  > the output of the aggregator to send back the request in the Out
>> message
>>  > to the
>>  > HTTP BC (see http://open.iona.com/issues/browse/ESB-18).
>>  >
>>  > I think the best way to go is to continue using your master endpoint,
>>  > but possibly
>>  > switch to using InOut instead of two InOnlys, and do the aggregation
>> of
>>  > the
>>  > messages inside the master endpoint.
>>  >
>>  > On Wed, Feb 6, 2008 at 1:26 PM, sachin2008 <es...@gmail.com>
>> wrote:
>>  >>
>>  >>  Hi, Thanks for your suggestion.
>>  >>  We have created seperate exchanges and send asynchronous request.
>>  >>  But we have  a small problem here. As we are sendig the requests
>>  >>  asynchronously, component do not wait for the resposne. So , to get
>> the
>>  >>  responses we have used the following approach.
>>  >>
>>  >>  Http BC sends InOut message to the  Master component. Master  sends
>> 4
>>  >>  requestes through different Inonly exchanges to various worker
>> beans.
>>  >> Then
>>  >>  worker beans sends the response back to the master component as
>> another
>>  >>  InOnly exchange but with the same corelation id.
>>  >>  In this scenario, we could not be able to find  whether the message
>> that
>>  >> we
>>  >>  are getting at the master component is from actual BC or from the
>> worker
>>  >>  component.
>>  >>
>>  >>  Is there any one to find which service has send the message to the
>>  >> master
>>  >>  component.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  gnodet wrote:
>>  >>  >
>>  >>  > 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 <es...@gmail.com> 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/
>>  >>  >
>>  >>  >
>>  >>
>>  >>  --
>>  >>  View this message in context:
>>  >>
>> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15306516.html
>>  >>
>>  >>
>>  >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>  >>
>>  >>
>>  >
>>  >
>>  >
>>  > --
>>  > Cheers,
>>  > Guillaume Nodet
>>  > ------------------------
>>  > Blog: http://gnodet.blogspot.com/
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15589649.html
>>
>>
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15604335.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by Guillaume Nodet <gn...@gmail.com>.
See http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-SplitAggregator
It relies on a few properties that have to be set on the exchange so
that it can aggregate everything.
You can also change the expression used if needed, but as you control
the splitter, I would first try
to use the default ones which are "count" and "index".
See http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/SplitAggregator.java?revision=602826&view=markup

On Wed, Feb 20, 2008 at 3:02 PM, sachin2008 <es...@gmail.com> wrote:
>
>  Can you provide the configuration details about aggregator for aggregating
>  two or many exchanges.
>
>
>
>  gnodet wrote:
>  >
>  > Sure there is a way to do that.  You can check the role of the exchange.
>  >    if (exchange.getRole() == Role.CONSUMER)
>  >
>  > if the role is CONSUMER, then it means the exchange has been sent by
>  > *this*
>  > component.  If the role is PROVIDER, the exchange has been sent by another
>  > component to this component.
>  >
>  > Btw, even if using an asynchronous call, you could still use an InOut
>  > pattern,
>  > which may be simpler in your case, instead of using two InOnlys.
>  >
>  > The other solution, as you suspected, it to use a split / aggregator
>  > pattern (which is
>  > what you do anyway).  The drawback is that you will have to find a way
>  > to correlate
>  > the output of the aggregator to send back the request in the Out message
>  > to the
>  > HTTP BC (see http://open.iona.com/issues/browse/ESB-18).
>  >
>  > I think the best way to go is to continue using your master endpoint,
>  > but possibly
>  > switch to using InOut instead of two InOnlys, and do the aggregation of
>  > the
>  > messages inside the master endpoint.
>  >
>  > On Wed, Feb 6, 2008 at 1:26 PM, sachin2008 <es...@gmail.com> wrote:
>  >>
>  >>  Hi, Thanks for your suggestion.
>  >>  We have created seperate exchanges and send asynchronous request.
>  >>  But we have  a small problem here. As we are sendig the requests
>  >>  asynchronously, component do not wait for the resposne. So , to get the
>  >>  responses we have used the following approach.
>  >>
>  >>  Http BC sends InOut message to the  Master component. Master  sends 4
>  >>  requestes through different Inonly exchanges to various worker beans.
>  >> Then
>  >>  worker beans sends the response back to the master component as another
>  >>  InOnly exchange but with the same corelation id.
>  >>  In this scenario, we could not be able to find  whether the message that
>  >> we
>  >>  are getting at the master component is from actual BC or from the worker
>  >>  component.
>  >>
>  >>  Is there any one to find which service has send the message to the
>  >> master
>  >>  component.
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>  gnodet wrote:
>  >>  >
>  >>  > 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 <es...@gmail.com> 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/
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15306516.html
>  >>
>  >>
>  >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >
>  >
>  >
>  > --
>  > Cheers,
>  > Guillaume Nodet
>  > ------------------------
>  > Blog: http://gnodet.blogspot.com/
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15589649.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Can you provide the configuration details about aggregator for aggregating
two or many exchanges.

gnodet wrote:
> 
> Sure there is a way to do that.  You can check the role of the exchange.
>    if (exchange.getRole() == Role.CONSUMER)
> 
> if the role is CONSUMER, then it means the exchange has been sent by
> *this*
> component.  If the role is PROVIDER, the exchange has been sent by another
> component to this component.
> 
> Btw, even if using an asynchronous call, you could still use an InOut
> pattern,
> which may be simpler in your case, instead of using two InOnlys.
> 
> The other solution, as you suspected, it to use a split / aggregator
> pattern (which is
> what you do anyway).  The drawback is that you will have to find a way
> to correlate
> the output of the aggregator to send back the request in the Out message
> to the
> HTTP BC (see http://open.iona.com/issues/browse/ESB-18).
> 
> I think the best way to go is to continue using your master endpoint,
> but possibly
> switch to using InOut instead of two InOnlys, and do the aggregation of
> the
> messages inside the master endpoint.
> 
> On Wed, Feb 6, 2008 at 1:26 PM, sachin2008 <es...@gmail.com> wrote:
>>
>>  Hi, Thanks for your suggestion.
>>  We have created seperate exchanges and send asynchronous request.
>>  But we have  a small problem here. As we are sendig the requests
>>  asynchronously, component do not wait for the resposne. So , to get the
>>  responses we have used the following approach.
>>
>>  Http BC sends InOut message to the  Master component. Master  sends 4
>>  requestes through different Inonly exchanges to various worker beans.
>> Then
>>  worker beans sends the response back to the master component as another
>>  InOnly exchange but with the same corelation id.
>>  In this scenario, we could not be able to find  whether the message that
>> we
>>  are getting at the master component is from actual BC or from the worker
>>  component.
>>
>>  Is there any one to find which service has send the message to the
>> master
>>  component.
>>
>>
>>
>>
>>
>>
>>  gnodet wrote:
>>  >
>>  > 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 <es...@gmail.com> 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/
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15306516.html
>>
>>
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15589649.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by Guillaume Nodet <gn...@gmail.com>.
Sure there is a way to do that.  You can check the role of the exchange.
   if (exchange.getRole() == Role.CONSUMER)

if the role is CONSUMER, then it means the exchange has been sent by *this*
component.  If the role is PROVIDER, the exchange has been sent by another
component to this component.

Btw, even if using an asynchronous call, you could still use an InOut pattern,
which may be simpler in your case, instead of using two InOnlys.

The other solution, as you suspected, it to use a split / aggregator
pattern (which is
what you do anyway).  The drawback is that you will have to find a way
to correlate
the output of the aggregator to send back the request in the Out message to the
HTTP BC (see http://open.iona.com/issues/browse/ESB-18).

I think the best way to go is to continue using your master endpoint,
but possibly
switch to using InOut instead of two InOnlys, and do the aggregation of the
messages inside the master endpoint.

On Wed, Feb 6, 2008 at 1:26 PM, sachin2008 <es...@gmail.com> wrote:
>
>  Hi, Thanks for your suggestion.
>  We have created seperate exchanges and send asynchronous request.
>  But we have  a small problem here. As we are sendig the requests
>  asynchronously, component do not wait for the resposne. So , to get the
>  responses we have used the following approach.
>
>  Http BC sends InOut message to the  Master component. Master  sends 4
>  requestes through different Inonly exchanges to various worker beans. Then
>  worker beans sends the response back to the master component as another
>  InOnly exchange but with the same corelation id.
>  In this scenario, we could not be able to find  whether the message that we
>  are getting at the master component is from actual BC or from the worker
>  component.
>
>  Is there any one to find which service has send the message to the master
>  component.
>
>
>
>
>
>
>  gnodet wrote:
>  >
>  > 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 <es...@gmail.com> 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/
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15306516.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Hi, Thanks for your suggestion. 
We have created seperate exchanges and send asynchronous request. 
But we have  a small problem here. As we are sendig the requests 
asynchronously, component do not wait for the resposne. So , to get the
responses we have used the following approach. 

Http BC sends InOut message to the  Master component. Master  sends 4
requestes through different Inonly exchanges to various worker beans. Then
worker beans sends the response back to the master component as another
InOnly exchange but with the same corelation id. 
In this scenario, we could not be able to find  whether the message that we
are getting at the master component is from actual BC or from the worker
component. 

Is there any one to find which service has send the message to the master
component. 




gnodet wrote:
> 
> 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 <es...@gmail.com> 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/
> 
> 

-- 
View this message in context: http://www.nabble.com/concurrent-execution-in-servicemix-tp15203567s12049p15306516.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by Guillaume Nodet <gn...@gmail.com>.
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 <es...@gmail.com> 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/

Re: concurrent execution in servicemix

Posted by Guillaume Nodet <gn...@gmail.com>.
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 <es...@gmail.com> 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/

Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
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.


Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Hi , 
Sorry I used  St flow in my code . Now i changed to seda flow . Now all the
requestes are processed concurrently and i acheived the desired
functinality. 

Thanks for your support.


-----
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-tp15203567s12049p15866137.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Hi , i changed the flow type to seda. Now its working fine . But a  small
change in the scenario. we have to use synchronous communcation only to send
requestes to all the data sources parallelly.  can u please tell us how to
acheive the same scenario with synchronous communication for InOut MEP.



gnodet wrote:
> 
> You use a SEDA flow, not a ST flow, right ? SEDA should be the default.
> Anyway, you can remote debug and see why the thread is blocked, but
> the code seems correct and should not block at all.  All three requests
> should
> be sent without blocking at all.
> 
> On Wed, Mar 5, 2008 at 3:57 PM, sachin2008 <es...@gmail.com> wrote:
>>
>>  Hi , I have already included a delay of some 5 seconds in the service
>> which
>>  will process my requests. as follows
>>  Thread.sleep(1000 * 5);
>>  So i will get a response after 5 seonds only
>>  But  during this 5 seconds no other request is being send.  once 5
>> seconds
>>  is finished i wiil get a response for the first request and then the
>> second
>>  request will be processed.
>>
>>  Do we need to inroduce any delay in the Master Component where i m
>> sending
>>  the requests?
>>
>>
>>
>>  -----
>>  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-tp15203567s12049p15852042.html
>>
>>
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 


-----
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-tp15203567s12049p16048029.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: concurrent execution in servicemix

Posted by Guillaume Nodet <gn...@gmail.com>.
You use a SEDA flow, not a ST flow, right ? SEDA should be the default.
Anyway, you can remote debug and see why the thread is blocked, but
the code seems correct and should not block at all.  All three requests should
be sent without blocking at all.

On Wed, Mar 5, 2008 at 3:57 PM, sachin2008 <es...@gmail.com> wrote:
>
>  Hi , I have already included a delay of some 5 seconds in the service which
>  will process my requests. as follows
>  Thread.sleep(1000 * 5);
>  So i will get a response after 5 seonds only
>  But  during this 5 seconds no other request is being send.  once 5 seconds
>  is finished i wiil get a response for the first request and then the second
>  request will be processed.
>
>  Do we need to inroduce any delay in the Master Component where i m sending
>  the requests?
>
>
>
>  -----
>  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-tp15203567s12049p15852042.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



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

Re: concurrent execution in servicemix

Posted by sachin2008 <es...@gmail.com>.
Hi , I have already included a delay of some 5 seconds in the service which
will process my requests. as follows 
Thread.sleep(1000 * 5);
So i will get a response after 5 seonds only 
But  during this 5 seconds no other request is being send.  once 5 seconds
is finished i wiil get a response for the first request and then the second
request will be processed.

Do we need to inroduce any delay in the Master Component where i m sending
the requests?


-----
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-tp15203567s12049p15852042.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.