cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shakeel Shaik <shak.sh...@gmail.com>
Subject Re: Log API time
Date Thu, 09 Feb 2012 16:37:56 GMT
As Surgey suggested, have two pairs of interceptors one at receive phase
and another at Send Phase. Have ThreadLocal in Receiver phase and retrieve
it in Send phase or at any other place you want.


Thanks,
Shak



On Thu, Feb 9, 2012 at 5:55 AM, Stas Ostapenko <stas.ostapenko@gmail.com>wrote:

> If you are using Spring it's can be implemented using AOP - around
> advice. Pointcut on methods of your endpoint interface.
>
> BR,
> Stas
>
> On Thu, Feb 9, 2012 at 1:48 PM, Sergey Beryozkin <sberyozkin@gmail.com>
> wrote:
> > On 09/02/12 11:34, Nishant Chandra wrote:
> >>
> >> Thanks. I was looking for a context to store and retrieve a value. I
> hope
> >> there will be no side effects in storing data using setExchange()?
> >>
> > Exchange is scoped by a given request only
> >
> > Cheers, Sergey
> >
> >
> >> Thanks,
> >> Nishant
> >>
> >> On Thu, Feb 9, 2012 at 4:26 PM, Sergey
> >> Beryozkin<sberyozkin@gmail.com>wrote:
> >>
> >>> On 09/02/12 10:10, Nishant Chandra wrote:
> >>>
> >>>> I agree. But I am more interested in time spent inside CXF.
> >>>>
> >>>>
> >>> Typically you can do it in CXF by using a pair of interceptors.
> >>> The CXF in interceptor will save the current time on the Exchange
> >>> (message.getExchange()) and then retrieve this value in the out
> >>> interceptors, or vice-versa if it's done on the client side
> >>>
> >>> HTH
> >>> Sergey
> >>>
> >>>
> >>>  Nishant
> >>>>
> >>>>
> >>>> On Thu, Feb 9, 2012 at 3:10 PM, Jens Borgland<jens.borgland@gmail.com
> >>>>>
> >>>>> wrote:
> >>>>
> >>>>
> >>>>  Hi,
> >>>>>
> >>>>>
> >>>>> I think that could much easier be handled with a servlet filter
> >>>>> (http://docs.oracle.com/javaee/6/api/javax/servlet/Filter.html).
> >>>>>
> >>>>> Jens
> >>>>>
> >>>>> 2012/2/9 Nishant Chandra<nishant.chandra@gmail.com>:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I was wondering if it is possible to log request processing
time
> i.e.
> >>>>>>
> >>>>> start
> >>>>>
> >>>>>> and end time using CXF interceptor?
> >>>>>>
> >>>>>> Thanks,
> >>>>>> Nishant
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> >>> --
> >>> Sergey Beryozkin
> >>>
> >>> Talend Community Coders
> >>> http://coders.talend.com/
> >>>
> >>> Blog: http://sberyozkin.blogspot.com
> >>>
> >>
> >>
> >>
> >
> >
> > --
> > Sergey Beryozkin
> >
> > Talend Community Coders
> > http://coders.talend.com/
> >
> > Blog: http://sberyozkin.blogspot.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message