You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/08/31 14:24:31 UTC
svn commit: r1163603 -
/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
Author: dkulp
Date: Wed Aug 31 12:24:31 2011
New Revision: 1163603
URL: http://svn.apache.org/viewvc?rev=1163603&view=rev
Log:
Restore contructor as it makes using it for mocks easier, but make it
not touch the thread local.
Modified:
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java?rev=1163603&r1=1163602&r2=1163603&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java Wed Aug 31 12:24:31 2011
@@ -43,13 +43,19 @@ public class WebServiceContextImpl imple
private static ThreadLocal<MessageContext> context = new ThreadLocal<MessageContext>();
+ private final MessageContext localCtx;
+
public WebServiceContextImpl() {
+ localCtx = null;
+ }
+
+ public WebServiceContextImpl(MessageContext c) {
+ localCtx = c;
}
// Implementation of javax.xml.ws.WebServiceContext
-
public final MessageContext getMessageContext() {
- return context.get();
+ return localCtx == null ? context.get() : localCtx;
}
public final Principal getUserPrincipal() {