Author: richard.opalka(a)jboss.com
Date: 2009-04-02 10:23:57 -0400 (Thu, 02 Apr 2009)
New Revision: 9710
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
Log:
[JBWS-2074] fixing Native code base
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 2009-04-02
14:20:48 UTC (rev 9709)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2009-04-02
14:23:57 UTC (rev 9710)
@@ -41,10 +41,13 @@
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.wsf.common.handler.GenericHandler;
import org.jboss.wsf.common.handler.GenericSOAPHandler;
import org.jboss.wsf.common.javax.JavaxAnnotationHelper;
+import org.jboss.wsf.spi.metadata.injection.InjectionMetaData;
+import org.jboss.wsf.spi.metadata.injection.InjectionsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -129,7 +132,7 @@
ClassLoader classLoader = serviceMetaData.getUnifiedMetaData().getClassLoader();
for (HandlerMetaData handlerMetaData : serviceMetaData.getHandlerMetaData())
- addHandler(classLoader, HandlerType.ENDPOINT, handlerMetaData);
+ addHandler(classLoader, HandlerType.ENDPOINT, handlerMetaData, null);
}
public void initHandlerChain(EndpointConfigMetaData epConfigMetaData, HandlerType
type, boolean clearExistingHandlers)
@@ -142,11 +145,12 @@
handlerMap.clear();
ClassLoader classLoader = epConfigMetaData.getEndpointMetaData().getClassLoader();
+ InjectionsMetaData injectionsMD = getInjectionsMetaData(epConfigMetaData);
for (HandlerMetaData handlerMetaData : epConfigMetaData.getHandlerMetaData(type))
- addHandler(classLoader, type, handlerMetaData);
+ addHandler(classLoader, type, handlerMetaData, injectionsMD);
}
- private void addHandler(ClassLoader classLoader, HandlerType type, HandlerMetaData
handlerMetaData)
+ private void addHandler(ClassLoader classLoader, HandlerType type, HandlerMetaData
handlerMetaData, InjectionsMetaData injections)
{
HandlerMetaDataJAXWS jaxwsMetaData = (HandlerMetaDataJAXWS)handlerMetaData;
String handlerName = jaxwsMetaData.getHandlerName();
@@ -166,7 +170,10 @@
((GenericSOAPHandler)handler).setHeaders(soapHeaders);
// Inject resources
- JavaxAnnotationHelper.injectResources(handler);
+ if (injections != null)
+ {
+ JavaxAnnotationHelper.injectResources(handler, injections);
+ }
// Call @PostConstruct
JavaxAnnotationHelper.callPostConstructMethod(handler);
@@ -282,4 +289,18 @@
return match;
}
}
+
+ private InjectionsMetaData getInjectionsMetaData(EndpointConfigMetaData
endpointConfigMD)
+ {
+ if (endpointConfigMD.getEndpointMetaData() instanceof ServerEndpointMetaData)
+ {
+ ServerEndpointMetaData endpointMD =
((ServerEndpointMetaData)endpointConfigMD.getEndpointMetaData());
+ return
endpointMD.getEndpoint().getService().getAttachment(InjectionsMetaData.class);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
}
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-04-02 14:20:48
UTC (rev 9709)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-04-02 14:23:57
UTC (rev 9710)
@@ -12,9 +12,6 @@
# [JBWS-1967] Implement in memory webapp deployment
org/jboss/test/ws/jaxws/endpoint/**
-# [JBWS-2074] Resource injection in jaxws endpoints and handlers
-org/jboss/test/ws/jaxws/jbws2074/**
-
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-04-02 14:20:48
UTC (rev 9709)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-04-02 14:23:57
UTC (rev 9710)
@@ -9,8 +9,5 @@
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
-# [JBWS-2074] Resource injection in jaxws endpoints and handlers
-org/jboss/test/ws/jaxws/jbws2074/**
-
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
Show replies by date