[jbossws-commits] JBossWS SVN: r12920 - in container/jboss60/branches/jbossws-jboss600M4/src/main: resources/jbossws-jboss.deployer/META-INF and 1 other directory.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Tue Sep 7 11:55:55 EDT 2010
Author: alessio.soldano at jboss.com
Date: 2010-09-07 11:55:54 -0400 (Tue, 07 Sep 2010)
New Revision: 12920
Modified:
container/jboss60/branches/jbossws-jboss600M4/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
container/jboss60/branches/jbossws-jboss600M4/src/main/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: container/jboss60/branches/jbossws-jboss600M4/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M4/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2010-09-07 10:44:38 UTC (rev 12919)
+++ container/jboss60/branches/jbossws-jboss600M4/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2010-09-07 15:55:54 UTC (rev 12920)
@@ -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: container/jboss60/branches/jbossws-jboss600M4/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600M4/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-09-07 10:44:38 UTC (rev 12919)
+++ container/jboss60/branches/jbossws-jboss600M4/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-09-07 15:55:54 UTC (rev 12920)
@@ -120,7 +120,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 jbossws-commits
mailing list