You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jcamus <jc...@parkeon.com> on 2009/08/25 10:53:17 UTC

Sample to manage external asynch calls with JMS ?

Hi!
Where can I find a sample that explain how to implement into SMX external
async calls with JMS ?

That's I would like something like that :

CXF-BC -> CXF-SE -> JMS -> CXF-SE external -> external calls to a remote
server...

And I want each job inside JMS to be purged only if external calls is a
sucess. If an error (a network error) then the job must still be into JMS.
So when server reconnects the JMS job is retried. 

How can I do that simply?

Regards.




-- 
View this message in context: http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25130701.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Sample to manage external asynch calls with JMS ?

Posted by jcamus <jc...@parkeon.com>.
Hi Freeman,
Sorry, I will try to be clearer. 
In fact I need to send some objects (transformed into the ESB from a SOAP
client) to a remote server. These objects are processed by the remote
server. ESB is pending to the the result of this process (that can be ok or
error).
If for some reason communication between ESB and remote server is cut off,
the objet currently processed must be sent again to the remote server.
1) How can I implement that into ESB? I know JMS can manage jobs with
acknowledgment features. But I need to have a kind of CXF-BC managing the
call the remote server (to manage errors as well). I'd like to have this
CXF-BC getting the objects to send from a JMS queue.
2) How can I detect communication has failed and test until communication
has been repaired to resend the objects?

I Hope it is clearer now for you...
Regards


Freeman Fang wrote:
> 
> Hi,
> 
> I can't understand you,
> could you explain more about what you mean "CXF-SE -> JMS -> CXF-SE  
> external " in your flow?
> What the CXF-SE external means ?
> Another question, do you mean you want to use cxf se to handle the jms  
> invocation, like cxf se is a jms client?
> If so, I don't think this is a good idea, from the JBI point of view,  
> all external protocol should be handled by the binding component, so  
> if you can't use soap over jms(which cxf bc can handle), then use  
> servicemix-jms binding component instead.
> 
> Freeman
> On 2009-8-25, at 下午9:19, jcamus wrote:
> 
>>
>> No sorry it doesn't help me! ;-)
>> Maybe I am not clear enough but I need to have some java code (CXF-SE)
>> before
>> putting the job into a JMS queue, so no SOAP or CXF to send to JMS.  
>> But I
>> need to have this job not complete until remote server has not  
>> finished. In
>> case of a network problem I want this job repeated to the remote  
>> server.
>>
>>
>>
>>
>> Freeman Fang wrote:
>>>
>>>
>>> On 2009-8-25, at 下午4:53, jcamus wrote:
>>>
>>>>
>>>> Hi!
>>>> Where can I find a sample that explain how to implement into SMX
>>>> external
>>>> async calls with JMS ?
>>>>
>>>> That's I would like something like that :
>>>>
>>>> CXF-BC -> CXF-SE -> JMS -> CXF-SE external -> external calls to a
>>>> remote
>>>
>>> Hi,
>>>
>>> I assume the "CXF-SE external" in your flow is a standalone cxf  
>>> server
>>> using jms transport.
>>> Then the JMS part in your flow, you can use cxf bc provider over jms
>>> transport instead, take a look at
>>> CxfBCSEProviderAsyncSystemTest
>>> .testGreetMeProviderWithJmsTransportAsync[1]
>>>
>>> [1]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/provider/CxfBCSEProviderAsyncSystemTest.java
>>>
>>> Freeman
>>>
>>>> server...
>>>>
>>>> And I want each job inside JMS to be purged only if external calls
>>>> is a
>>>> sucess. If an error (a network error) then the job must still be
>>>> into JMS.
>>>> So when server reconnects the JMS job is retried.
>>>>
>>>> How can I do that simply?
>>>>
>>>> Regards.
>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25130701.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> Apache Servicemix Commiter/PMC membeer
>>> Apache Cxf Commiter/PMC member
>>> Apache Felix Commiter
>>>
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25134096.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> Apache Servicemix Commiter/PMC membeer
> Apache Cxf Commiter/PMC member
> Apache Felix Commiter
> 
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25147734.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Sample to manage external asynch calls with JMS ?

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I can't understand you,
could you explain more about what you mean "CXF-SE -> JMS -> CXF-SE  
external " in your flow?
What the CXF-SE external means ?
Another question, do you mean you want to use cxf se to handle the jms  
invocation, like cxf se is a jms client?
If so, I don't think this is a good idea, from the JBI point of view,  
all external protocol should be handled by the binding component, so  
if you can't use soap over jms(which cxf bc can handle), then use  
servicemix-jms binding component instead.

Freeman
On 2009-8-25, at 下午9:19, jcamus wrote:

>
> No sorry it doesn't help me! ;-)
> Maybe I am not clear enough but I need to have some java code (CXF-SE)
> before
> putting the job into a JMS queue, so no SOAP or CXF to send to JMS.  
> But I
> need to have this job not complete until remote server has not  
> finished. In
> case of a network problem I want this job repeated to the remote  
> server.
>
>
>
>
> Freeman Fang wrote:
>>
>>
>> On 2009-8-25, at 下午4:53, jcamus wrote:
>>
>>>
>>> Hi!
>>> Where can I find a sample that explain how to implement into SMX
>>> external
>>> async calls with JMS ?
>>>
>>> That's I would like something like that :
>>>
>>> CXF-BC -> CXF-SE -> JMS -> CXF-SE external -> external calls to a
>>> remote
>>
>> Hi,
>>
>> I assume the "CXF-SE external" in your flow is a standalone cxf  
>> server
>> using jms transport.
>> Then the JMS part in your flow, you can use cxf bc provider over jms
>> transport instead, take a look at
>> CxfBCSEProviderAsyncSystemTest
>> .testGreetMeProviderWithJmsTransportAsync[1]
>>
>> [1]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/provider/CxfBCSEProviderAsyncSystemTest.java
>>
>> Freeman
>>
>>> server...
>>>
>>> And I want each job inside JMS to be purged only if external calls
>>> is a
>>> sucess. If an error (a network error) then the job must still be
>>> into JMS.
>>> So when server reconnects the JMS job is retried.
>>>
>>> How can I do that simply?
>>>
>>> Regards.
>>>
>>>
>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25130701.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> Apache Servicemix Commiter/PMC membeer
>> Apache Cxf Commiter/PMC member
>> Apache Felix Commiter
>>
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25134096.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com




Re: Sample to manage external asynch calls with JMS ?

Posted by jcamus <jc...@parkeon.com>.
No sorry it doesn't help me! ;-)
Maybe I am not clear enough but I need to have some java code (CXF-SE)
before 
putting the job into a JMS queue, so no SOAP or CXF to send to JMS. But I
need to have this job not complete until remote server has not finished. In
case of a network problem I want this job repeated to the remote server.




Freeman Fang wrote:
> 
> 
> On 2009-8-25, at 下午4:53, jcamus wrote:
> 
>>
>> Hi!
>> Where can I find a sample that explain how to implement into SMX  
>> external
>> async calls with JMS ?
>>
>> That's I would like something like that :
>>
>> CXF-BC -> CXF-SE -> JMS -> CXF-SE external -> external calls to a  
>> remote
> 
> Hi,
> 
> I assume the "CXF-SE external" in your flow is a standalone cxf server  
> using jms transport.
> Then the JMS part in your flow, you can use cxf bc provider over jms  
> transport instead, take a look at  
> CxfBCSEProviderAsyncSystemTest 
> .testGreetMeProviderWithJmsTransportAsync[1]
> 
> [1]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/provider/CxfBCSEProviderAsyncSystemTest.java
> 
> Freeman
> 
>> server...
>>
>> And I want each job inside JMS to be purged only if external calls  
>> is a
>> sucess. If an error (a network error) then the job must still be  
>> into JMS.
>> So when server reconnects the JMS job is retried.
>>
>> How can I do that simply?
>>
>> Regards.
>>
>>
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25130701.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> Apache Servicemix Commiter/PMC membeer
> Apache Cxf Commiter/PMC member
> Apache Felix Commiter
> 
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25134096.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Sample to manage external asynch calls with JMS ?

Posted by Freeman Fang <fr...@gmail.com>.
On 2009-8-25, at 下午4:53, jcamus wrote:

>
> Hi!
> Where can I find a sample that explain how to implement into SMX  
> external
> async calls with JMS ?
>
> That's I would like something like that :
>
> CXF-BC -> CXF-SE -> JMS -> CXF-SE external -> external calls to a  
> remote

Hi,

I assume the "CXF-SE external" in your flow is a standalone cxf server  
using jms transport.
Then the JMS part in your flow, you can use cxf bc provider over jms  
transport instead, take a look at  
CxfBCSEProviderAsyncSystemTest 
.testGreetMeProviderWithJmsTransportAsync[1]

[1]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/provider/CxfBCSEProviderAsyncSystemTest.java

Freeman

> server...
>
> And I want each job inside JMS to be purged only if external calls  
> is a
> sucess. If an error (a network error) then the job must still be  
> into JMS.
> So when server reconnects the JMS job is retried.
>
> How can I do that simply?
>
> Regards.
>
>
>
>
> -- 
> View this message in context: http://www.nabble.com/Sample-to-manage-external-asynch-calls-with-JMS---tp25130701p25130701.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
Apache Servicemix Commiter/PMC membeer
Apache Cxf Commiter/PMC member
Apache Felix Commiter

------------------------
Open Source SOA: http://fusesource.com