You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by ajayk_goel <aj...@hotmail.com> on 2006/09/12 18:54:48 UTC

httpConnector using asynchronous

I have implemented a new class extending the HttpConnector and it works good
in synchronous mode.  I want to turn this into aSynchronous as this
component needs to interact with few more SEs in our enviroment and we don't
want to make all this call syncronous.  Can some one help me configure this?
1) I changed by serviceMix file to have new property <property
name="defaultInOut" value="false" />
2) I changes my  process(HttpServletRequest request, HttpServletResponse
response) to processInOnly
3) Made the call boolean result = getDeliveryChannel().sendSync(exchange);
to getDeliveryChannel().send(exchange)

How do I get the handle back now and tie up the response with the
corresponding request?  Do we have add another SE like ChainedCompoenent or
PipeLineComponent in the serviceMix?

Thanks

-- 
View this message in context: http://www.nabble.com/httpConnector-using-asynchronous-tf2260079.html#a6270166
Sent from the ServiceMix - User forum at Nabble.com.


Re: httpConnector using asynchronous

Posted by ajayk_goel <aj...@hotmail.com>.
Only thing I am trying to do is to make my call to the ESB asynchronous so
that I don't ties up threads within ESB.  My enviroment has hops to 4
different SE and I don't want to have a synchronous call in all those SE. 
Only place where I need synchronous call is where I get the request from the
client so that I can send back the response based on results from my SEs. 
So I guess I do need InOut so that I have request as well as response

Thanks


gnodet wrote:
> 
> If you use an InOnly exchange, there is no response,
> so you should be able to send the exchange
> asynchronously.   if you need to handle responses,
> that's a lot of work.  This has been done in servicemix-http
> using Jetty continuations.  Is that what you are looking for ?
> 
> 
> On 9/12/06, ajayk_goel <aj...@hotmail.com> wrote:
>>
>>
>> I have implemented a new class extending the HttpConnector and it works
>> good
>> in synchronous mode.  I want to turn this into aSynchronous as this
>> component needs to interact with few more SEs in our enviroment and we
>> don't
>> want to make all this call syncronous.  Can some one help me configure
>> this?
>> 1) I changed by serviceMix file to have new property <property
>> name="defaultInOut" value="false" />
>> 2) I changes my  process(HttpServletRequest request, HttpServletResponse
>> response) to processInOnly
>> 3) Made the call boolean result =
>> getDeliveryChannel().sendSync(exchange);
>> to getDeliveryChannel().send(exchange)
>>
>> How do I get the handle back now and tie up the response with the
>> corresponding request?  Do we have add another SE like ChainedCompoenent
>> or
>> PipeLineComponent in the serviceMix?
>>
>> Thanks
>>
>> --
>> View this message in context:
>> http://www.nabble.com/httpConnector-using-asynchronous-tf2260079.html#a6270166
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/httpConnector-using-asynchronous-tf2260079.html#a6274176
Sent from the ServiceMix - User forum at Nabble.com.


Re: httpConnector using asynchronous

Posted by Guillaume Nodet <gn...@gmail.com>.
If you use an InOnly exchange, there is no response,
so you should be able to send the exchange
asynchronously.   if you need to handle responses,
that's a lot of work.  This has been done in servicemix-http
using Jetty continuations.  Is that what you are looking for ?


On 9/12/06, ajayk_goel <aj...@hotmail.com> wrote:
>
>
> I have implemented a new class extending the HttpConnector and it works
> good
> in synchronous mode.  I want to turn this into aSynchronous as this
> component needs to interact with few more SEs in our enviroment and we
> don't
> want to make all this call syncronous.  Can some one help me configure
> this?
> 1) I changed by serviceMix file to have new property <property
> name="defaultInOut" value="false" />
> 2) I changes my  process(HttpServletRequest request, HttpServletResponse
> response) to processInOnly
> 3) Made the call boolean result = getDeliveryChannel().sendSync(exchange);
> to getDeliveryChannel().send(exchange)
>
> How do I get the handle back now and tie up the response with the
> corresponding request?  Do we have add another SE like ChainedCompoenent
> or
> PipeLineComponent in the serviceMix?
>
> Thanks
>
> --
> View this message in context:
> http://www.nabble.com/httpConnector-using-asynchronous-tf2260079.html#a6270166
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet