Author: alessio.soldano(a)jboss.com
Date: 2010-09-07 12:04:33 -0400 (Tue, 07 Sep 2010)
New Revision: 12922
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
stack/native/trunk/modules/core/src/main/resources/jbossws-native-config-as6.xml
Log:
[JBWS-3121] Prevent JAXWSMetadataBuilderEJB3 from using EJB3.1 beans not linked to ws
endpoint and make sure the Unified Model is build only after the endpoints' addresses
have been computed
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2010-09-07
16:00:38 UTC (rev 12921)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2010-09-07
16:04:33 UTC (rev 12922)
@@ -30,6 +30,8 @@
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
@@ -71,9 +73,10 @@
EJBMetaData beanMetaData = it.next();
String ejbClassName = beanMetaData.getEjbClass();
Class<?> beanClass =
wsMetaData.getClassLoader().loadClass(ejbClassName);
- if (beanClass.isAnnotationPresent(WebService.class) ||
beanClass.isAnnotationPresent(WebServiceProvider.class))
+ Service service = dep.getService();
+ String ejbLink = beanMetaData.getEjbName();
+ if (service.getEndpointByName(ejbLink) != null &&
(beanClass.isAnnotationPresent(WebService.class) ||
beanClass.isAnnotationPresent(WebServiceProvider.class)))
{
- String ejbLink = beanMetaData.getEjbName();
JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData,
beanClass, ejbLink);
/* Resolve dependency on @SecurityDomain
Modified:
stack/native/trunk/modules/core/src/main/resources/jbossws-native-config-as6.xml
===================================================================
---
stack/native/trunk/modules/core/src/main/resources/jbossws-native-config-as6.xml 2010-09-07
16:00:38 UTC (rev 12921)
+++
stack/native/trunk/modules/core/src/main/resources/jbossws-native-config-as6.xml 2010-09-07
16:04:33 UTC (rev 12922)
@@ -73,7 +73,7 @@
</bean>
<bean name="WSNativeUnifiedMetaDataDeploymentAspect"
class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
- <property name="requires">ContainerMetaData, URLPattern, VFSRoot,
JAXBIntros</property>
+ <property name="requires">ContainerMetaData, URLPattern,
EndpointAddress, VFSRoot, JAXBIntros</property>
<property name="provides">UnifiedMetaDataModel</property>
</bean>
Show replies by date