You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Andrei Shakirin <as...@talend.com> on 2011/11/18 17:59:35 UTC

Recognize one way operation from Destination

Hi,

One transport specific question: are there any way to recognize communication pattern (one-way, request-response) from transport destination at the time when message is received from the network?

Use case: custom transport should send additional confirmation in case of one way operations, but communication pattern cannot be recognized from incoming message.
The question is can destination access implementation class or service interface to check @OneWay annotation for corresponded method? Or is there other solution here?

Regards,
Andrei.

RE: Recognize one way operation from Destination

Posted by Andrei Shakirin <as...@talend.com>.
Hi Dan,

Yep, it works.

Thanks,
Andrei.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: 18 November 2011 19:40
To: users@cxf.apache.org
Cc: Andrei Shakirin
Subject: Re: Recognize one way operation from Destination

On Friday, November 18, 2011 4:59:35 PM Andrei Shakirin wrote:
> Hi,
> 
> One transport specific question: are there any way to recognize 
> communication pattern (one-way, request-response) from transport 
> destination at the time when message is received from the network?

No.   You pretty much have to get at least as far as the initial parsing.


> Use case: custom transport should send additional confirmation in case 
> of one way operations, but communication pattern cannot be recognized 
> from incoming message. The question is can destination access 
> implementation class or service interface to check @OneWay annotation 
> for corresponded method? Or is there other solution here?

The OneWayProcessorInterceptor will callback on your destination once it knows 
that the operation is a OneWay.   Thus, at that point, you can handle  
whatever cleanup options and such are necessary (or, in the case of HTTP, sent 
the 202).   This occurs  before the call to the service method.


--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com

Re: Recognize one way operation from Destination

Posted by Daniel Kulp <dk...@apache.org>.
On Friday, November 18, 2011 4:59:35 PM Andrei Shakirin wrote:
> Hi,
> 
> One transport specific question: are there any way to recognize
> communication pattern (one-way, request-response) from transport
> destination at the time when message is received from the network?

No.   You pretty much have to get at least as far as the initial parsing.


> Use case: custom transport should send additional confirmation in case of
> one way operations, but communication pattern cannot be recognized from
> incoming message. The question is can destination access implementation
> class or service interface to check @OneWay annotation for corresponded
> method? Or is there other solution here?

The OneWayProcessorInterceptor will callback on your destination once it knows 
that the operation is a OneWay.   Thus, at that point, you can handle  
whatever cleanup options and such are necessary (or, in the case of HTTP, sent 
the 202).   This occurs  before the call to the service method.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com