Greetings.

I am using Eclipse Virgo as my OSGi platform with Spring and CXF
under-the-hood. My architecture is such that the CXF web server is in one
OSGi bundle, and the service being deployed is in another.

Ultimately, I am really only need the client ip address, but I need the
MessageContext to get at it. It seems that WebServiceContextImpl uses
ThreadLocal to get at the MessageContext for the current thread (
http://grepcode.com/file/repository.jboss.com/maven2/org.apache.cxf/cxf-rt-frontend-jaxws/2.2.2/org/apache/cxf/jaxws/context/WebServiceContextImpl.java?av=f
see ). When I attempt to retrieve the MessageContext, I keep getting null.

My theory for why I am unable to obtain the MessageContext instance is that
the OSGi is utilizing multiple Threads to do it's magic, hence the service
would be in a different Thread that what would normally be expected.

What other options do I have to access the MessageContext in a Thread safe
way?

Thanks.
-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/Obtain-MessageContext-in-OSGi-environment-tp3250459p3250459.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to