tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r920328 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
Date Mon, 08 Mar 2010 14:13:06 GMT
Author: jlmonteiro
Date: Mon Mar  8 14:13:05 2010
New Revision: 920328

URL: http://svn.apache.org/viewvc?rev=920328&view=rev
Log:
OPENEJB-1241: Using @WebServiceRef doesn't allow Service.create usage (standard JAX-WS usage).
OpenEJB register its own ProviderWrapper during the first call (ie. set the system property).
So, for upcoming JAX-WS usage, our ProviderWrapper will be used.

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java?rev=920328&r1=920327&r2=920328&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
Mon Mar  8 14:13:05 2010
@@ -61,7 +61,7 @@
     public static final Logger logger = Logger.getInstance(LogCategory.OPENEJB_WS, ProviderWrapper.class);
 
     //
-    // Magic to get our proider wrapper installed with the PortRefData
+    // Magic to get our provider wrapper installed with the PortRefData
     //
 
     private static ThreadLocal<ProviderWrapperData> threadPortRefs = new ThreadLocal<ProviderWrapperData>();
@@ -104,7 +104,7 @@
 
 
     //
-    // Provider wappre implementation
+    // Provider wapper implementation
     //
 
     private final Provider delegate;
@@ -112,7 +112,7 @@
 
     public ProviderWrapper() {
         delegate = findProvider();
-        portRefs = threadPortRefs.get().portRefData;
+        portRefs = (threadPortRefs.get() == null) ? null : threadPortRefs.get().portRefData;
     }
 
     public Provider getDelegate() {
@@ -121,7 +121,12 @@
 
     public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName,
Class serviceClass) {
         ServiceDelegate serviceDelegate = delegate.createServiceDelegate(wsdlDocumentLocation,
serviceName, serviceClass);
-        serviceDelegate = new ServiceDelegateWrapper(serviceDelegate);
+        // the PortRef list is bound to this thread when using @WebServiceRef injection
+        // When using the JAX-WS API we don't need to wrap the ServiceDelegate
+        if (threadPortRefs.get() != null) {
+            serviceDelegate = new ServiceDelegateWrapper(serviceDelegate);
+            
+        }
         return serviceDelegate;
     }
 



Mime
View raw message