You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by rssole <rs...@hotmail.com> on 2011/09/21 10:14:52 UTC

Share data between inbound and outbound interceptor

Hi, as this is my first message let me first greet you all.

Now :) check the following scenario, it is just an idea not that I think it
is very nice design.
I'd like to log the time between incoming message and outgoing message.

Now there are in and out logging interceptors but that is not sufficient.

I was thinking of adding two custom intercetors, inbound to keep data on
time message has arrived,
and other one, outbound to take that time, calculate difference and log it.

Now, I am not really sure whether something like this is possible within
CXF, as not sure how to make those two interceptors "communicate". Is it
maybe possible with custom feature? Giving outbound interceptor reference to
inbound... Or to make question more specific, is it possible control
interceptors creation with custom feature?

Kind regards

--
View this message in context: http://cxf.547215.n5.nabble.com/Share-data-between-inbound-and-outbound-interceptor-tp4825527p4825527.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Share data between inbound and outbound interceptor

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
You should probably use message.getExchange() in order to get in/out 
interceptors 'communicating'

Cheers, Sergey
On 21/09/11 09:14, rssole wrote:
> Hi, as this is my first message let me first greet you all.
>
> Now :) check the following scenario, it is just an idea not that I think it
> is very nice design.
> I'd like to log the time between incoming message and outgoing message.
>
> Now there are in and out logging interceptors but that is not sufficient.
>
> I was thinking of adding two custom intercetors, inbound to keep data on
> time message has arrived,
> and other one, outbound to take that time, calculate difference and log it.
>
> Now, I am not really sure whether something like this is possible within
> CXF, as not sure how to make those two interceptors "communicate". Is it
> maybe possible with custom feature? Giving outbound interceptor reference to
> inbound... Or to make question more specific, is it possible control
> interceptors creation with custom feature?
>
> Kind regards
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Share-data-between-inbound-and-outbound-interceptor-tp4825527p4825527.html
> Sent from the cxf-user mailing list archive at Nabble.com.