[jboss-cvs] JBossAS SVN: r85750 - in projects/ejb3/trunk/proxy/src: main/java/org/jboss/ejb3/proxy/factory/session/stateful and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 11 19:16:27 EDT 2009


Author: ALRubinger
Date: 2009-03-11 19:16:27 -0400 (Wed, 11 Mar 2009)
New Revision: 85750

Added:
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionLocalProxyInvocationHandler.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionRemoteProxyInvocationHandler.java
Removed:
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecLocalProxyInvocationHandler.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandler.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandlerBase.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecRemoteProxyInvocationHandler.java
Modified:
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceLocalProxyFactory.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceRemoteProxyFactory.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionLocalProxyFactory.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionRemoteProxyFactory.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionLocalProxyFactory.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionRemoteProxyFactory.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandler.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandlerBase.java
   projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java
   projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/unit/JNDIBindingTestCase.java
Log:
[EJBTHREE-1765] Unify InvocationHandlers and remove notion of Session vs. SessionSpec

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceLocalProxyFactory.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceLocalProxyFactory.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -25,7 +25,7 @@
 
 import org.jboss.aop.Advisor;
 import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecLocalProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionLocalProxyInvocationHandler;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
 
@@ -84,7 +84,7 @@
    }
 
    @Override
-   protected SessionSpecLocalProxyInvocationHandler createInvocationHandler()
+   protected SessionLocalProxyInvocationHandler createInvocationHandler()
    {
       // Obtain container name
       String containerName = this.getContainerName();
@@ -94,7 +94,7 @@
       Interceptor[] interceptors = this.getInterceptors();
 
       // Create
-      SessionSpecLocalProxyInvocationHandler handler = new SessionSpecLocalProxyInvocationHandler(containerName,
+      SessionLocalProxyInvocationHandler handler = new SessionLocalProxyInvocationHandler(containerName,
             containerGuid, interceptors, null);
 
       // Return

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceRemoteProxyFactory.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/service/ServiceRemoteProxyFactory.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -25,7 +25,7 @@
 
 import org.jboss.aop.Advisor;
 import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionRemoteProxyInvocationHandler;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
 
@@ -135,7 +135,7 @@
    // --------------------------------------------------------------------------------||
 
    @Override
-   protected SessionSpecRemoteProxyInvocationHandler createInvocationHandler()
+   protected SessionRemoteProxyInvocationHandler createInvocationHandler()
    {
       // Obtain properties
       String containerName = this.getContainerName();
@@ -146,7 +146,7 @@
       Interceptor[] interceptors = this.getInterceptors();
 
       // Create
-      SessionSpecRemoteProxyInvocationHandler handler = new SessionSpecRemoteProxyInvocationHandler(containerName,
+      SessionRemoteProxyInvocationHandler handler = new SessionRemoteProxyInvocationHandler(containerName,
             containerGuid, interceptors, null, url);
 
       // Return

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionLocalProxyFactory.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionLocalProxyFactory.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -27,7 +27,7 @@
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.ejb3.proxy.factory.session.SessionSpecProxyFactory;
 import org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandler;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecLocalProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionLocalProxyInvocationHandler;
 import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
 
 /**
@@ -120,7 +120,7 @@
       Interceptor[] interceptors = this.getInterceptors();
 
       // Create
-      SessionProxyInvocationHandler handler = new SessionSpecLocalProxyInvocationHandler(containerName, containerGuid,
+      SessionProxyInvocationHandler handler = new SessionLocalProxyInvocationHandler(containerName, containerGuid,
             interceptors, businessInterfaceName);
 
       // Return

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionRemoteProxyFactory.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionRemoteProxyFactory.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -27,7 +27,7 @@
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.ejb3.proxy.factory.session.SessionSpecProxyFactory;
 import org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandler;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionRemoteProxyInvocationHandler;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
 
@@ -169,7 +169,7 @@
       Interceptor[] interceptors = this.getInterceptors();
 
       // Create
-      SessionProxyInvocationHandler handler = new SessionSpecRemoteProxyInvocationHandler(containerName, containerGuid,
+      SessionProxyInvocationHandler handler = new SessionRemoteProxyInvocationHandler(containerName, containerGuid,
             interceptors, businessInterfaceName, url);
 
       // Return

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionLocalProxyFactory.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionLocalProxyFactory.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -27,7 +27,7 @@
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.ejb3.proxy.factory.session.SessionSpecProxyFactory;
 import org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandler;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecLocalProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionLocalProxyInvocationHandler;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
 
@@ -123,7 +123,7 @@
       Interceptor[] interceptors = this.getInterceptors();
 
       // Create
-      SessionProxyInvocationHandler handler = new SessionSpecLocalProxyInvocationHandler(containerName, containerGuid,
+      SessionProxyInvocationHandler handler = new SessionLocalProxyInvocationHandler(containerName, containerGuid,
             interceptors, businessInterfaceName);
 
       // Return

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionRemoteProxyFactory.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateless/StatelessSessionRemoteProxyFactory.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -27,7 +27,7 @@
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.ejb3.proxy.factory.session.SessionSpecProxyFactory;
 import org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandler;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionRemoteProxyInvocationHandler;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
 
@@ -171,7 +171,7 @@
       Interceptor[] interceptors = this.getInterceptors();
 
       // Create
-      SessionProxyInvocationHandler handler = new SessionSpecRemoteProxyInvocationHandler(containerName, containerGuid,
+      SessionProxyInvocationHandler handler = new SessionRemoteProxyInvocationHandler(containerName, containerGuid,
             interceptors, businessInterfaceName, url);
 
       // Return

Copied: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionLocalProxyInvocationHandler.java (from rev 85749, projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecLocalProxyInvocationHandler.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionLocalProxyInvocationHandler.java	                        (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionLocalProxyInvocationHandler.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.proxy.handler.session;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.container.InvokableContext;
+
+/**
+ * SessionLocalProxyInvocationHandler
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class SessionLocalProxyInvocationHandler extends SessionProxyInvocationHandlerBase implements Serializable
+{
+
+   // --------------------------------------------------------------------------------||
+   // Class Members ------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private static final long serialVersionUID = 1L;
+
+   // --------------------------------------------------------------------------------||
+   // Constructor --------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * Constructor
+    * 
+    * @param containerName The name of the target container
+    * @param containerGuid The globally-unique name of the container
+    * @param interceptors The interceptors to apply to invocations upon this handler
+    */
+   public SessionLocalProxyInvocationHandler(final String containerName, final String containerGuid,
+         final Interceptor[] interceptors)
+   {
+      super(containerName, containerGuid, interceptors, null, null);
+   }
+
+   /**
+    * Constructor
+    * 
+    * @param containerName The name of the target container
+    * @param containerGuid The globally-unique name of the container
+    * @param businessInterfaceType The possibly null businessInterfaceType
+    *   marking this invocation hander as specific to a given
+    *   EJB3 Business Interface
+    * @param interceptors The interceptors to apply to invocations upon this handler
+    */
+   public SessionLocalProxyInvocationHandler(final String containerName, final String containerGuid,
+         final Interceptor[] interceptors, final String businessInterfaceType)
+   {
+      super(containerName, containerGuid, interceptors, businessInterfaceType, null);
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Required Implementations -------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /* (non-Javadoc)
+    * @see org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandlerBase#getContainer()
+    */
+   @Override
+   protected InvokableContext getContainer()
+   {
+      return this.getContainerLocally();
+   }
+
+}

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandler.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandler.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -43,20 +43,24 @@
    // Contracts --------------------------------------------------------------------||
    // ------------------------------------------------------------------------------||
 
-   public Object getTarget();
+   Object getTarget();
 
-   public void setTarget(final Object target);
+   void setTarget(final Object target);
 
-   public String getContainerName();
+   String getContainerName();
 
-   public void setContainerName(final String containerName);
+   void setContainerName(final String containerName);
 
-   public Interceptor[] getInterceptors();
+   Interceptor[] getInterceptors();
 
-   public void setInterceptors(final Interceptor[] interceptors);
+   void setInterceptors(final Interceptor[] interceptors);
 
-   public String getContainerGuid();
+   String getContainerGuid();
 
-   public void setContainerGuid(final String containerGuid);
+   void setContainerGuid(final String containerGuid);
 
+   String getBusinessInterfaceType();
+
+   void setBusinessInterfaceType(final String businessInterfaceType);
+
 }
\ No newline at end of file

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandlerBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandlerBase.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandlerBase.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -127,6 +127,13 @@
     */
    private String containerGuid;
 
+   /**
+    * Fully-qualified name of the class targeted either for injection
+    * or casting to support getInvokedBusinessInterface.  May be
+    * null to denote non-deterministic invocation
+    */
+   private String businessInterfaceType;
+
    // ------------------------------------------------------------------------------||
    // Constructor ------------------------------------------------------------------||
    // ------------------------------------------------------------------------------||
@@ -137,13 +144,16 @@
     * @param containerName The name of the target Container
     * @param containerGuid The globally-unique name of the container
     * @param interceptors The interceptors to apply to invocations upon this handler
+    * @param businessInterfaceType Possibly null FQN of business interface 
+    * @param target The target object (Session ID)
     */
    protected SessionProxyInvocationHandlerBase(final String containerName, final String containerGuid,
-         final Interceptor[] interceptors, final Object target)
+         final Interceptor[] interceptors, final String businessInterfaceType, final Object target)
    {
       this.setContainerName(containerName);
       this.setContainerGuid(containerGuid);
       this.setInterceptors(interceptors);
+      this.setBusinessInterfaceType(businessInterfaceType);
       this.setTarget(target);
    }
 
@@ -152,6 +162,26 @@
    // ------------------------------------------------------------------------------||
 
    /**
+    * Required "invoke" as defined by InvocationHandler interface
+    */
+   public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+   {
+      // Precondition check
+      assert proxy instanceof SessionProxy : this + " is eligible for handling " + SessionProxy.class.getName()
+            + " invocations only";
+      SessionProxy sessionProxy = (SessionProxy) proxy;
+
+      // Obtain an explicitly-specified actual class
+      String actualClass = this.getBusinessInterfaceType();
+
+      // Set the invoked method
+      SerializableMethod invokedMethod = new SerializableMethod(method, actualClass);
+
+      // Use the overloaded implementation
+      return this.invoke(sessionProxy, invokedMethod, args);
+   }
+
+   /**
     * Overloaded "invoke" which takes into account a {@link SerializableMethod} 
     * view
     * 
@@ -489,4 +519,14 @@
       this.containerGuid = containerGuid;
    }
 
+   public String getBusinessInterfaceType()
+   {
+      return businessInterfaceType;
+   }
+
+   public void setBusinessInterfaceType(String businessInterfaceType)
+   {
+      this.businessInterfaceType = businessInterfaceType;
+   }
+
 }

Copied: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionRemoteProxyInvocationHandler.java (from rev 85749, projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecRemoteProxyInvocationHandler.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionRemoteProxyInvocationHandler.java	                        (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionRemoteProxyInvocationHandler.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.proxy.handler.session;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.container.InvokableContext;
+
+/**
+ * SessionRemoteProxyInvocationHandler
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class SessionRemoteProxyInvocationHandler extends SessionProxyInvocationHandlerBase implements Serializable
+{
+
+   // --------------------------------------------------------------------------------||
+   // Class Members ------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private static final long serialVersionUID = 1L;
+
+   // --------------------------------------------------------------------------------||
+   // Instance Members ---------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private String url;
+
+   // --------------------------------------------------------------------------------||
+   // Constructor --------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * Constructor
+    * 
+    * @param containerName The name of the target container
+    * @param containerGuid The globally-unique name of the container
+    * @param businessInterfaceType The possibly null businessInterfaceType
+    *   marking this invocation hander as specific to a given
+    *   EJB3 Business Interface
+    * @param url The URL to the Remote Host
+    * @param interceptors The interceptors to apply to invocations upon this handler
+    */
+   public SessionRemoteProxyInvocationHandler(final String containerName, final String containerGuid,
+         final Interceptor[] interceptors, final String businessInterfaceType, final String url)
+   {
+      super(containerName, containerGuid, interceptors, businessInterfaceType, null);
+
+      // Set properties
+      this.setUrl(url);
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Required Implementations -------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /* (non-Javadoc)
+    * @see org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandlerBase#getContainer()
+    */
+   @Override
+   protected InvokableContext getContainer()
+   {
+      return this.createRemoteProxyToContainer(this.getUrl());
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Accessors / Mutators -----------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   public String getUrl()
+   {
+      return url;
+   }
+
+   public void setUrl(String url)
+   {
+      this.url = url;
+   }
+
+}

Deleted: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecLocalProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecLocalProxyInvocationHandler.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecLocalProxyInvocationHandler.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
-  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.proxy.handler.session;
-
-import java.io.Serializable;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.proxy.container.InvokableContext;
-
-/**
- * SessionSpecLocalProxyInvocationHandler
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class SessionSpecLocalProxyInvocationHandler extends SessionSpecProxyInvocationHandlerBase implements Serializable
-{
-
-   // --------------------------------------------------------------------------------||
-   // Class Members ------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private static final long serialVersionUID = 1L;
-
-   // --------------------------------------------------------------------------------||
-   // Constructor --------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /**
-    * Constructor
-    * 
-    * @param containerName The name of the target container
-    * @param containerGuid The globally-unique name of the container
-    * @param interceptors The interceptors to apply to invocations upon this handler
-    */
-   public SessionSpecLocalProxyInvocationHandler(final String containerName, final String containerGuid,
-         final Interceptor[] interceptors)
-   {
-      super(containerName, containerGuid, interceptors, null, null);
-   }
-
-   /**
-    * Constructor
-    * 
-    * @param containerName The name of the target container
-    * @param containerGuid The globally-unique name of the container
-    * @param businessInterfaceType The possibly null businessInterfaceType
-    *   marking this invocation hander as specific to a given
-    *   EJB3 Business Interface
-    * @param interceptors The interceptors to apply to invocations upon this handler
-    */
-   public SessionSpecLocalProxyInvocationHandler(final String containerName, final String containerGuid,
-         final Interceptor[] interceptors, final String businessInterfaceType)
-   {
-      super(containerName, containerGuid, interceptors, businessInterfaceType, null);
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Required Implementations -------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /* (non-Javadoc)
-    * @see org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandlerBase#getContainer()
-    */
-   @Override
-   protected InvokableContext getContainer()
-   {
-      return this.getContainerLocally();
-   }
-
-}

Deleted: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandler.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandler.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.ejb3.proxy.handler.session;
-
-/**
- * SessionSpecProxyInvocationHandler
- * 
- * Defines contract for operations required of
- * a Session Bean Proxy Invocation Handler 
- * following the EJB3 Specification
- * 
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: 72638 $
- */
-public interface SessionSpecProxyInvocationHandler extends SessionProxyInvocationHandler
-{
-
-}
\ No newline at end of file

Deleted: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandlerBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandlerBase.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandlerBase.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.proxy.handler.session;
-
-import java.io.Serializable;
-import java.lang.reflect.Method;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.common.lang.SerializableMethod;
-import org.jboss.ejb3.proxy.intf.SessionProxy;
-import org.jboss.logging.Logger;
-
-/**
- * SessionSpecProxyInvocationHandlerBase
- * 
- * Abstract base from which all Session Proxy InvocationHandlers
- * adhering to the EJB3 specification may extend
- * 
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public abstract class SessionSpecProxyInvocationHandlerBase extends SessionProxyInvocationHandlerBase
-      implements
-         SessionSpecProxyInvocationHandler,
-         Serializable
-{
-   // ------------------------------------------------------------------------------||
-   // Class Members ----------------------------------------------------------------||
-   // ------------------------------------------------------------------------------||
-
-   private static final long serialVersionUID = 1L;
-
-   private static final Logger log = Logger.getLogger(SessionSpecProxyInvocationHandlerBase.class);
-
-   // ------------------------------------------------------------------------------||
-   // Instance Members -------------------------------------------------------------||
-   // ------------------------------------------------------------------------------||
-
-   /**
-    * Fully-qualified name of the class targeted either for injection
-    * or casting to support getInvokedBusinessInterface.  May be
-    * null to denote non-deterministic invocation
-    */
-   private String businessInterfaceType;
-
-   // ------------------------------------------------------------------------------||
-   // Constructors -----------------------------------------------------------------||
-   // ------------------------------------------------------------------------------||
-
-   /**
-    * Constructor
-    * 
-    * @param containerName The name under which the target container is registered
-    * @param containerGuid The globally-unique name of the container
-    * @param businessInterfaceType The possibly null businessInterfaceType
-    *   marking this invocation hander as specific to a given
-    *   EJB3 Business Interface
-    * @param interceptors The interceptors to apply to invocations upon this handler
-    * @param target
-    */
-   protected SessionSpecProxyInvocationHandlerBase(final String containerName, final String containerGuid,
-         final Interceptor[] interceptors, final String businessInterfaceType, final Object target)
-   {
-      super(containerName, containerGuid, interceptors, target);
-      this.setBusinessInterfaceType(businessInterfaceType);
-   }
-
-   // ------------------------------------------------------------------------------||
-   // Required Implementations -----------------------------------------------------||
-   // ------------------------------------------------------------------------------||
-
-   /**
-    * Required "invoke" as defined by InvocationHandler interface
-    */
-   public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
-   {
-      // Precondition check
-      assert proxy instanceof SessionProxy : this + " is eligible for handling " + SessionProxy.class.getName()
-            + " invocations only";
-      SessionProxy sessionProxy = (SessionProxy) proxy;
-
-      // Obtain an explicitly-specified actual class
-      String actualClass = this.getBusinessInterfaceType();
-
-      // Set the invoked method
-      SerializableMethod invokedMethod = new SerializableMethod(method, actualClass);
-
-      // Use the overloaded implementation
-      return this.invoke(sessionProxy, invokedMethod, args);
-   }
-
-   // ------------------------------------------------------------------------------||
-   // Accessors / Mutators ---------------------------------------------------------||
-   // ------------------------------------------------------------------------------||
-
-   protected String getBusinessInterfaceType()
-   {
-      return businessInterfaceType;
-   }
-
-   protected void setBusinessInterfaceType(String businessInterfaceType)
-   {
-      this.businessInterfaceType = businessInterfaceType;
-   }
-}

Deleted: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecRemoteProxyInvocationHandler.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecRemoteProxyInvocationHandler.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
-  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.proxy.handler.session;
-
-import java.io.Serializable;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.proxy.container.InvokableContext;
-
-/**
- * SessionSpecRemoteProxyInvocationHandler
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class SessionSpecRemoteProxyInvocationHandler extends SessionSpecProxyInvocationHandlerBase
-      implements
-         Serializable
-{
-
-   // --------------------------------------------------------------------------------||
-   // Class Members ------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private static final long serialVersionUID = 1L;
-
-   // --------------------------------------------------------------------------------||
-   // Instance Members ---------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private String url;
-
-   // --------------------------------------------------------------------------------||
-   // Constructor --------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /**
-    * Constructor
-    * 
-    * @param containerName The name of the target container
-    * @param containerGuid The globally-unique name of the container
-    * @param businessInterfaceType The possibly null businessInterfaceType
-    *   marking this invocation hander as specific to a given
-    *   EJB3 Business Interface
-    * @param url The URL to the Remote Host
-    * @param interceptors The interceptors to apply to invocations upon this handler
-    */
-   public SessionSpecRemoteProxyInvocationHandler(final String containerName, final String containerGuid,
-         final Interceptor[] interceptors, final String businessInterfaceType, final String url)
-   {
-      super(containerName, containerGuid, interceptors, businessInterfaceType, null);
-
-      // Set properties
-      this.setUrl(url);
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Required Implementations -------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /* (non-Javadoc)
-    * @see org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandlerBase#getContainer()
-    */
-   @Override
-   protected InvokableContext getContainer()
-   {
-      return this.createRemoteProxyToContainer(this.getUrl());
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Accessors / Mutators -----------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   public String getUrl()
-   {
-      return url;
-   }
-
-   public void setUrl(String url)
-   {
-      this.url = url;
-   }
-
-}

Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -29,7 +29,7 @@
 import junit.framework.TestCase;
 
 import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionRemoteProxyInvocationHandler;
 import org.jboss.ejb3.proxy.remoting.ProxyRemotingUtils;
 import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
 import org.jboss.ejb3.test.proxy.common.Utils;
@@ -86,7 +86,7 @@
       // Get the clientBindUrl from the Proxy itself
       Class<?> proxyClass = bean.getClass();
       assert Proxy.isProxyClass(proxyClass) : "Stub from JNDI was not a " + Proxy.class.getName();
-      SessionSpecRemoteProxyInvocationHandler handler = (SessionSpecRemoteProxyInvocationHandler) Proxy
+      SessionRemoteProxyInvocationHandler handler = (SessionRemoteProxyInvocationHandler) Proxy
             .getInvocationHandler(bean);
       String clientBindUrl = handler.getUrl();
 

Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/unit/JNDIBindingTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/unit/JNDIBindingTestCase.java	2009-03-11 23:06:42 UTC (rev 85749)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/unit/JNDIBindingTestCase.java	2009-03-11 23:16:27 UTC (rev 85750)
@@ -48,7 +48,7 @@
 import org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar;
 import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
 import org.jboss.ejb3.common.registrar.spi.NotBoundException;
-import org.jboss.ejb3.proxy.handler.session.SessionSpecRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.session.SessionRemoteProxyInvocationHandler;
 import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
 import org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar;
 import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
@@ -308,7 +308,7 @@
       Object obj1 = context.lookup(ClientBindUrlBindingTest.JNDI_BINDING_1);
       
       // Get the underlying URL
-      SessionSpecRemoteProxyInvocationHandler handler1 = (SessionSpecRemoteProxyInvocationHandler) Proxy
+      SessionRemoteProxyInvocationHandler handler1 = (SessionRemoteProxyInvocationHandler) Proxy
             .getInvocationHandler(obj1);
       String url1 = handler1.getUrl();
       
@@ -323,7 +323,7 @@
       Object obj2 = context.lookup(ClientBindUrlBindingTest.JNDI_BINDING_2);
       
       // Get the underlying URL
-      SessionSpecRemoteProxyInvocationHandler handler2 = (SessionSpecRemoteProxyInvocationHandler) Proxy
+      SessionRemoteProxyInvocationHandler handler2 = (SessionRemoteProxyInvocationHandler) Proxy
             .getInvocationHandler(obj2);
       String url2 = handler2.getUrl();
       




More information about the jboss-cvs-commits mailing list