On 13/12/11 06:30, Rice Yeh wrote:
I am using JAXRS and I have solved the problem by overriding JAXRSInvoker
instead of having thread local variables initialized in another interceptor.

did you use your own ThreadLocal storage ?
PhaseIntereceptorChain will always give you the current Message and you can get to message.getExchange() - setting properties on Exchange will make the available for for in/out interceptors for the duration of requests.

Cheers, Sergey


Thanks,
Rice

On Sun, Dec 11, 2011 at 1:06 AM, Sergey Beryozkin<[email protected]>wrote:

Hi

On 09/12/11 18:19, Rice Yeh wrote:

Hi,
   I just find that there are many threads serve a http request. My case
jaxrs and I find that threads running the interceptor.handleMessage,
resource code, interceptor.handleFault and exception mapper are not same.
This makes thread local variables cannot be used for transferring
information among them. Is there a way to make them all run by the same
thread?

  If it were the case we'd leak contexts on every request; so before you
can assert CXF leaks local variables :-) lets try to find out what is
actually happening; do you have a server app acting as a client and the
client part needs to get some context info available to the server ?

Cheers, Sergey

  Rice



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


Reply via email to