camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: camel-cxf async processor w/in-out mep using jms transport
Date Fri, 22 Aug 2008 01:54:35 GMT
Hi Ron,

After digging the code ,  CXF's JMS transport[1] 
conduit.handleResponse()[2] will block the thread when it waits for the 
reply.
In camel-jms[3]  which can be used as camel-transport for CXF[4], the 
template takes care of the message receiving work  and the main thread 
uses future (JmsProducer.process()[5])to correlates the request and 
response.

There is no much difference between the CXF's JMS transport and 
camel-jms from the camel-cxf side, since the calling thread is blocked 
when it waits for the response whether it uses future or not.

[1]http://cwiki.apache.org/CXF20DOC/jms-transport.html
[2]https://svn.apache.org/repos/asf/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
[3]http://cwiki.apache.org/CAMEL/jms.html
[4]http://cwiki.apache.org/CAMEL/camel-transport-for-cxf.html
[5]https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java

Willem

rgavlin wrote:
> Hi Willem,
>
> Let me try to rephrase my question.
>
> When camel-cxf sends its in-out jms request to an external service, does it
> lock that thread while it waits for the reply? Or is the incoming request
> thread released and another pool of threads used to monitor the temporary
> replyTo queue and automatically correlate the request/response before
> returning the message exchange to the caller? I believe the smx-cxf-bc async
> provider does the latter which is my desired behavior. Does camel-cxf
> provide similar functionality? If so, how would it be configured?
>
> - Ron
>
>
> willem.jiang wrote:
>   
>> Hi Ron,
>>
>> I went through the unit test in SM-1413, it only shows how to invoke the 
>> service with ServiceMix client API.
>> Since camel-cxf component only interact with SMX by servicemix-camel 
>> component, camel-cxf can't see any ServiceMix client invoke.
>> If you want to invoke the external web service by using jms transport in 
>> camel-cxf , you just need to set the transport factory to jms.
>>
>> There is a unit test[1] in camel to show how to use camel transport in 
>> CXF , please check it out .
>>
>> [1] 
>> https://svn.apache.org/repos/asf/activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations
>> The configuration files
>> [2] 
>> https://svn.apache.org/repos/asf/activemq/camel/trunk/tests/camel-itest/src/test/resources/spring-config
>>
>> Willem
>> rgavlin wrote:
>>     
>>> I currently use a servicemix-cxf-bc "provider" to asynchronously send an
>>> in-out mep to an external web service using the jms transport. See
>>> https://issues.apache.org/activemq/browse/SM-1413 for a test that
>>> demonstrates this capability.
>>>
>>> I would also like to use the camel-cxf component in a similar fashion.
>>> Does
>>> camel-cxf provide an asynchronous processor to send an in-out mep to an
>>> external web service using the jms transport? If so, how is this
>>> configured?
>>>
>>> Thanks,
>>>
>>> - Ron
>>>   
>>>       
>>
>>     
>
>   


Mime
View raw message