[jboss-cvs] JBossAS SVN: r73057 - in trunk: ejb3 and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 5 06:42:31 EDT 2008


Author: heiko.braun at jboss.com
Date: 2008-05-05 06:42:31 -0400 (Mon, 05 May 2008)
New Revision: 73057

Modified:
   trunk/component-matrix/pom.xml
   trunk/ejb3/build.xml
   trunk/server/build.xml
   trunk/thirdparty/pom.xml
   trunk/tomcat/build.xml
   trunk/tomcat/pom.xml
   trunk/webservices/build.xml
   trunk/webservices/pom.xml
   trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
   trunk/webservices/src/main/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
   trunk/webservices/src/main/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java
Log:
Update to ws spi 1.0.3.GA: WS -> EJB invocation handling

Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/component-matrix/pom.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -690,14 +690,8 @@
         <artifactId>resources</artifactId>
         <version>3.0.1.GA</version>
       </dependency>
-      
+           
       <dependency>
-        <groupId>jboss.jbossws-spi</groupId>
-        <artifactId>jbossws-spi</artifactId>
-        <version>1.0.2.GA</version>
-      </dependency>
-      
-      <dependency>
         <groupId>jboss.jms-integration-tests</groupId>
         <artifactId>integration-mdb20</artifactId>
         <version>${version.jboss.jms-integration-tests}</version>
@@ -1044,6 +1038,12 @@
       </dependency>
       
       <dependency>
+        <groupId>org.jboss.ws</groupId>
+        <artifactId>jbossws-spi</artifactId>
+        <version>1.0.3.GA</version>
+      </dependency>
+      
+      <dependency>
         <groupId>org.jboss.naming</groupId>
         <artifactId>jnp-client</artifactId>
         <version>5.0.0.CR1</version>       

Modified: trunk/ejb3/build.xml
===================================================================
--- trunk/ejb3/build.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/ejb3/build.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -108,7 +108,7 @@
          <path refid="jboss.jboss.vfs.classpath"/>
          <path refid="quartz.quartz.classpath"/>
          <path refid="jboss.jbossws.classpath"/>
-         <path refid="jboss.jbossws.spi.classpath"/>
+         <path refid="org.jboss.ws.classpath"/>
          <path refid="jboss.jbossxb.classpath"/>
          <path refid="jacorb.jacorb.classpath"/>
          <path refid="dom4j.dom4j.classpath"/>

Modified: trunk/server/build.xml
===================================================================
--- trunk/server/build.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/server/build.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -85,7 +85,7 @@
       <path refid="jboss.integration.classpath"/>
       <path refid="jboss.jbossxb.classpath"/>
       <path refid="jboss.jbossws.classpath"/>
-      <path refid="jboss.jbossws.spi.classpath"/>
+      <path refid="org.jboss.ws.classpath"/>
       <path refid="jboss.metadata.classpath"/>
       <path refid="jboss.jboss.deployers.classpath"/>
       <path refid="jboss.jboss.man.classpath"/>

Modified: trunk/thirdparty/pom.xml
===================================================================
--- trunk/thirdparty/pom.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/thirdparty/pom.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -1326,7 +1326,7 @@
       <artifactId>resources</artifactId>
     </dependency>
     <dependency>
-      <groupId>jboss.jbossws-spi</groupId>
+      <groupId>org.jboss.ws</groupId>
       <artifactId>jbossws-spi</artifactId>
     </dependency>
     <dependency>

Modified: trunk/tomcat/build.xml
===================================================================
--- trunk/tomcat/build.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/tomcat/build.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -61,7 +61,7 @@
       <path refid="jboss.common.core.classpath"/>
       <path refid="jboss.common.logging.spi.classpath"/>
       <path refid="jboss.jbossws.classpath"/>
-      <path refid="jboss.jbossws.spi.classpath"/>
+      <path refid="org.jboss.ws.classpath"/>
       <path refid="jboss.jbossxb.classpath"/>
       <path refid="jboss.serialization.classpath"/>
       <path refid="jboss.metadata.classpath"/>      

Modified: trunk/tomcat/pom.xml
===================================================================
--- trunk/tomcat/pom.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/tomcat/pom.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -140,7 +140,7 @@
       </exclusions>
     </dependency>
     <dependency>
-      <groupId>jboss.jbossws-spi</groupId>
+      <groupId>org.jboss.ws</groupId>
       <artifactId>jbossws-spi</artifactId>
     </dependency>
     <dependency>
@@ -257,4 +257,4 @@
     </dependency>
   </dependencies>
   
-</project>
\ No newline at end of file
+</project>

Modified: trunk/webservices/build.xml
===================================================================
--- trunk/webservices/build.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/webservices/build.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -82,7 +82,7 @@
       <path refid="jboss.jbossws.classpath"/>
       <path refid="jboss.jbossws.common.classpath"/>
       <path refid="jboss.jbossws.framework.classpath"/>
-      <path refid="jboss.jbossws.spi.classpath"/>
+      <path refid="org.jboss.ws.classpath"/>
       <path refid="jboss.jbossxb.classpath"/>
       <path refid="jboss.metadata.classpath"/>
       <path refid="jboss.jboss.deployers.classpath"/>      

Modified: trunk/webservices/pom.xml
===================================================================
--- trunk/webservices/pom.xml	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/webservices/pom.xml	2008-05-05 10:42:31 UTC (rev 73057)
@@ -114,7 +114,7 @@
       <artifactId>jboss-deployers-core-spi</artifactId>
     </dependency>
     <dependency>
-      <groupId>jboss.jbossws-spi</groupId>
+      <groupId>org.jboss.ws</groupId>
       <artifactId>jbossws-spi</artifactId>
     </dependency>
     <dependency>
@@ -143,4 +143,4 @@
     </dependency>
   </dependencies>
   
-</project>
\ No newline at end of file
+</project>

Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java	2008-05-05 10:42:31 UTC (rev 73057)
@@ -25,15 +25,12 @@
 
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.wsf.common.ObjectNameFactory;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.spi.invocation.Invocation;
 import org.jboss.wsf.spi.invocation.integration.InvocationContextCallback;
 import org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer;
 import org.jboss.wsf.spi.util.KernelLocator;
 
-import javax.management.ObjectName;
 import javax.xml.ws.WebServiceException;
 import java.lang.reflect.Method;
 
@@ -41,12 +38,18 @@
  * Handles invocations on EJB3 endpoints.
  *
  * @author Thomas.Diesler at jboss.org
+ * @author Heiko.Braun at jboss.com
+ * 
  * @since 25-Apr-2007
  */
 public class InvocationHandlerEJB3 extends AbstractInvocationHandler
 {
-   private ObjectName objectName;
+
+   public static final String CONTAINER_NAME = "org.jboss.wsf.spi.invocation.ContainerName";
+
+   private String containerName;
    private KernelController houston;
+   private ServiceEndpointContainer invocationTarget;
 
    InvocationHandlerEJB3()
    {
@@ -60,35 +63,27 @@
 
    public void init(Endpoint ep)
    {
-      String ejbName = ep.getShortName();
-      ArchiveDeployment dep = (ArchiveDeployment)ep.getService().getDeployment();
-      String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + dep.getSimpleName();
-      if (dep.getParent() != null)
-      {
-         nameStr += ",ear=" + dep.getParent().getSimpleName();
-      }
+      containerName = (String)ep.getProperty(InvocationHandlerEJB3.CONTAINER_NAME);
+      assert containerName!=null : "Target container name not set";
 
-      objectName = ObjectNameFactory.create(nameStr.toString());
-
-      if (houston.getInstalledContext( objectName.getCanonicalName() ) == null)
-         throw new WebServiceException("Cannot find service endpoint target: " + objectName);
+      ControllerContext context = houston.getInstalledContext(containerName);
+      if (context == null)
+         throw new WebServiceException("Cannot find service endpoint target: " + containerName);
+      
+      assert (context.getTarget() instanceof ServiceEndpointContainer) : "Invocation target mismatch";
+      this.invocationTarget = (ServiceEndpointContainer) context.getTarget();
    }
-
+   
    public void invoke(Endpoint ep, Invocation wsInv) throws Exception
    {
       try
-      {
-         ControllerContext context = houston.getInstalledContext(objectName.getCanonicalName());
-         assert (context.getTarget() instanceof ServiceEndpointContainer) : "Invocation target mismatch";
-
-         ServiceEndpointContainer endpointContainer = (ServiceEndpointContainer) context.getTarget();
-
-         Class beanClass = endpointContainer.getServiceImplementationClass();
+      {                  
+         Class beanClass = invocationTarget.getServiceImplementationClass();
          Method method = getImplMethod(beanClass, wsInv.getJavaMethod());
          Object[] args = wsInv.getArgs();
          InvocationContextCallback invProps = new EJB3InvocationContextCallback(wsInv);
 
-         Object retObj = endpointContainer.invokeEndpoint(method, args, invProps);
+         Object retObj = invocationTarget.invokeEndpoint(method, args, invProps);
 
          wsInv.setReturnValue(retObj);
       }

Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java	2008-05-05 10:42:31 UTC (rev 73057)
@@ -82,6 +82,10 @@
             // Create the endpoint
             Endpoint ep = newEndpoint(epBean);
             ep.setShortName(ejbName);
+            String containName = container.getContainerName();
+            if(null==containName)
+               throw new IllegalArgumentException("Target container name not set");
+            ep.setProperty(InvocationHandlerEJB3.CONTAINER_NAME, containName);
             service.addEndpoint(ep);
          }
       }

Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java	2008-05-05 07:19:34 UTC (rev 73056)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java	2008-05-05 10:42:31 UTC (rev 73057)
@@ -24,13 +24,13 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.ejb.deployers.MergedJBossMetaDataDeployer;
-import org.jboss.ejb3.Ejb3Deployment;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
 import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
 import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.ejb3.Ejb3Deployment;
 
 import java.lang.annotation.Annotation;
 import java.util.ArrayList;
@@ -68,8 +68,6 @@
       JBossMetaData beans = (JBossMetaData)unit.getAttachment(
         MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME
       );
-
-      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
       
       if(beans!=null)
       {
@@ -113,7 +111,7 @@
 
       public String getContainerName()
       {
-         throw new RuntimeException("Not implemented");
+         return ejbMetaData.determineContainerName();
       }
 
       public String getComponentName()




More information about the jboss-cvs-commits mailing list