Sorry. My bad. The value being set in TLS was NULL which created the confusion :)
Thanks & Regards, Anil On Tue, May 31, 2011 at 12:40 AM, Sergey Beryozkin <[email protected]>wrote: > Hi > > On Mon, May 30, 2011 at 6:27 PM, Blue Diamond <[email protected]> wrote: > > Hi Sergey, > > > > Thanks for your quick response. This is how I am starting a JAXRS > endpoint & > > engaging interceptors: > > > > JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean(); > > factory.setServiceBean(this); > > factory.setAddress(url); > > factory.getInInterceptors().add(new Interceptor1(this)); > > factory.getInInterceptors().add(new InInterceptor2(this)); > > factory.start(); > > > > > > in my InInterceptor1.. after some validation, I do a > MyTLS.setObject(obj). > > And in my InInterceptor2, when I do a MyTLS.getObject(), it gives me a > > NULL.(No issues with MyTLS normally). > > > > I can't imagine interceptors are being run each in a seperate thread > since > > its a chain mechanism! > > > I'm not sure you should introduce your own TLS. > Use > > PhaseInterceptorChain.getCurrentMessage().put(name, value); > and > PhaseInterceptorChain.getCurrentMessage().get(name); > > Cheers, Sergey > > > Thanks & Regards, > > Anil > > > > > > On Mon, May 30, 2011 at 10:03 PM, Sergey Beryozkin <[email protected] > >wrote: > > > >> Can you describe at what stage you are trying to retrieve a TLS property > ? > >> When does the 2nd interceptor run ? > >> > >> thanks, Sergey > >> > >> On Mon, May 30, 2011 at 4:29 PM, Blue Diamond <[email protected]> > wrote: > >> > Hi, > >> > > >> > I have a couple of SoapInterceptors engaged to my REST/WS service. In > the > >> > first interceptor, I am setting a TLS variable. But I am not able to > get > >> the > >> > TLS variable from inside the second interceptor. Does CXF spawn > multiple > >> > threads for interceptors? Why is TLS not working in this case? What > >> should I > >> > do to make it work? > >> > > >> > Thanks & Regards, > >> > Anil > >> > > >> > >> > >> > >> -- > >> Sergey Beryozkin > >> > >> Application Integration Division of Talend > >> http://sberyozkin.blogspot.com > >> > > > > > > -- > Sergey Beryozkin > > Application Integration Division of Talend > http://sberyozkin.blogspot.com >
