Author: richard.opalka(a)jboss.com
Date: 2010-03-30 05:20:35 -0400 (Tue, 30 Mar 2010)
New Revision: 11888
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
Log:
[JBWS-2970] endpoints will provide associated JNDI context, not deployment time hack
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2010-03-30
09:06:47 UTC (rev 11887)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2010-03-30
09:20:35 UTC (rev 11888)
@@ -28,6 +28,7 @@
import java.util.Map;
import java.util.Set;
+import javax.naming.Context;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.HandlerResolver;
@@ -46,6 +47,8 @@
import org.jboss.wsf.common.handler.GenericHandler;
import org.jboss.wsf.common.handler.GenericSOAPHandler;
import org.jboss.wsf.common.injection.InjectionHelper;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointAssociation;
import org.jboss.wsf.spi.metadata.injection.InjectionsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -171,7 +174,12 @@
if (handler instanceof GenericSOAPHandler)
((GenericSOAPHandler)handler).setHeaders(soapHeaders);
- InjectionHelper.injectResources(handler, injections);
+ if (injections != null)
+ {
+ Endpoint ep = EndpointAssociation.getEndpoint();
+ Context ctx = ep == null ? null : ep.getJNDIContext();
+ InjectionHelper.injectResources(handler, injections, ctx);
+ }
InjectionHelper.callPostConstructMethod(handler);
addHandler(jaxwsMetaData, handler, type);
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2010-03-30
09:06:47 UTC (rev 11887)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2010-03-30
09:20:35 UTC (rev 11888)
@@ -28,6 +28,8 @@
import java.util.List;
import java.util.Map;
+import javax.naming.Context;
+import javax.naming.NamingException;
import javax.xml.namespace.QName;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingProperties;
@@ -372,4 +374,10 @@
return this.delegate;
}
+ @Override
+ public Context getJNDIContext(Endpoint ep) throws NamingException
+ {
+ return this.delegate.getJNDIContext(ep);
+ }
+
}
Show replies by date