cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1163603 - /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
Date Wed, 31 Aug 2011 12:24:31 GMT
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() {



Mime
View raw message