[jboss-cvs] JBossAS SVN: r108011 - in trunk/webservices/src: resources/jbossws-jboss.deployer/META-INF and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 7 11:55:16 EDT 2010


Author: alessio.soldano at jboss.com
Date: 2010-09-07 11:55:16 -0400 (Tue, 07 Sep 2010)
New Revision: 108011

Modified:
   trunk/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
   trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-3121] Prevent usage of EJB3.1 beans not linked to a ws endpoint when doing injections and register endpoints only after having computed their address


Modified: trunk/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- trunk/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java	2010-09-07 14:55:57 UTC (rev 108010)
+++ trunk/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java	2010-09-07 15:55:16 UTC (rev 108011)
@@ -45,6 +45,7 @@
 import org.jboss.wsf.common.integration.WSHelper;
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
 import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
 import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
 import org.jboss.wsf.spi.metadata.injection.InjectionMetaData;
@@ -131,20 +132,20 @@
          this.log.debug("Building injection meta data for JAXWS EJB3 webservice deployment: " + dep.getSimpleName());
          final WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit,
                WebServiceDeployment.class);
+         final Service service = dep.getService();
 
          // iterate through all EJB3 endpoints
          for (final WebServiceDeclaration container : webServiceDeployment.getServiceEndpoints())
          {
-            if (ASHelper.isWebServiceBean(container))
+            final String ejbName = container.getComponentName();
+            final Endpoint endpoint = service.getEndpointByName(ejbName);
+            if (endpoint != null && ASHelper.isWebServiceBean(container))
             {
-               final String ejbName = container.getComponentName();
-
                // build EJB 3 injections meta data
                final EnvironmentEntriesMetaData ejbEnvEntries = this.getEnvironmentEntries(ejbName, unit);
                final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(ejbEnvEntries, resolvers);
 
                // associate injections meta data with EJB 3 endpoint
-               final Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
                endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
             }
          }

Modified: trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml	2010-09-07 14:55:57 UTC (rev 108010)
+++ trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml	2010-09-07 15:55:16 UTC (rev 108011)
@@ -111,7 +111,7 @@
   </bean>
 
   <bean name="WSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
-    <property name="requires">EndpointName</property>
+    <property name="requires">EndpointName, EndpointAddress</property>
     <property name="provides">RegisteredEndpoint</property>
   </bean>
 



More information about the jboss-cvs-commits mailing list