[jboss-cvs] JBossAS SVN: r76742 - in projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy: handler/session and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 7 01:15:23 EDT 2008


Author: ALRubinger
Date: 2008-08-07 01:15:23 -0400 (Thu, 07 Aug 2008)
New Revision: 76742

Added:
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/SessionSpecRemotingMetadata.java
Modified:
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerBase.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/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java
   projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/StatefulSessionRemotingMetadata.java
Log:
[EJBTHREE-1345] Further Proxy API Cleanup; get the invoked method off the InvocationHandler itself and instead onto Invocation Metadata

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerBase.java	2008-08-07 05:12:07 UTC (rev 76741)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerBase.java	2008-08-07 05:15:23 UTC (rev 76742)
@@ -83,11 +83,6 @@
    // ------------------------------------------------------------------------------||
 
    /**
-    * The invoked method
-    */
-   private SerializableMethod invokedMethod;
-
-   /**
     * The name under which the target container is registered
     */
    private String containerName;

Modified: 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	2008-08-07 05:12:07 UTC (rev 76741)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandler.java	2008-08-07 05:15:23 UTC (rev 76742)
@@ -34,14 +34,5 @@
  */
 public interface SessionSpecProxyInvocationHandler extends SessionProxyInvocationHandler
 {
-   /**
-    * Returns the business interface upon which 
-    * the current invocation was made.  If null, this
-    * signifies a non-deterministic state in which any number
-    * of business interfaces may have been bound 
-    * to this Proxy
-    * 
-    * @return
-    */
-   String getBusinessInterfaceType();
+
 }
\ No newline at end of file

Modified: 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	2008-08-07 05:12:07 UTC (rev 76741)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandlerBase.java	2008-08-07 05:15:23 UTC (rev 76742)
@@ -128,7 +128,7 @@
    // Accessors / Mutators ---------------------------------------------------------||
    // ------------------------------------------------------------------------------||
 
-   public String getBusinessInterfaceType()
+   protected String getBusinessInterfaceType()
    {
       return businessInterfaceType;
    }

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java	2008-08-07 05:12:07 UTC (rev 76741)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java	2008-08-07 05:15:23 UTC (rev 76742)
@@ -31,6 +31,7 @@
 import org.jboss.aspects.remoting.PojiProxy;
 import org.jboss.ejb3.common.lang.SerializableMethod;
 import org.jboss.ejb3.proxy.container.InvokableContext;
+import org.jboss.ejb3.proxy.remoting.SessionSpecRemotingMetadata;
 import org.jboss.ejb3.proxy.remoting.StatefulSessionRemotingMetadata;
 import org.jboss.ejb3.stateful.StatefulRemoteInvocation;
 import org.jboss.logging.Logger;
@@ -156,6 +157,11 @@
        */
       MethodInvocation sri = new StatefulRemoteInvocation(this.getInterceptors(), hash, dynamicInvokeMethod,
             dynamicInvokeMethod, null, this.getSessionId());
+      
+      // Manually add metadata for invoked method
+      sri.getMetaData().addMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
+            SessionSpecRemotingMetadata.KEY_INVOKED_METHOD, serializableMethod);
+      
       return sri;
    }
 

Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/SessionSpecRemotingMetadata.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/SessionSpecRemotingMetadata.java	                        (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/SessionSpecRemotingMetadata.java	2008-08-07 05:15:23 UTC (rev 76742)
@@ -0,0 +1,45 @@
+/*
+ * 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.remoting;
+
+/**
+ * SessionSpecRemotingMetadata
+ * 
+ * Contains constants used in Remoting metadata
+ * for Session Spec Invocations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface SessionSpecRemotingMetadata
+{
+
+   /**
+    * AOP Metadata Tag for SFSB Remoting Invocations
+    */
+   String TAG_SESSION_INVOCATION = "SessionInvocation";
+
+   /**
+    * AOP Metadata Key for SFSB Session ID
+    */
+   String KEY_INVOKED_METHOD = "InvokedMethod";
+}

Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/StatefulSessionRemotingMetadata.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/StatefulSessionRemotingMetadata.java	2008-08-07 05:12:07 UTC (rev 76741)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/StatefulSessionRemotingMetadata.java	2008-08-07 05:15:23 UTC (rev 76742)
@@ -36,7 +36,7 @@
    /**
     * AOP Metadata Tag for SFSB Remoting Invocations
     */
-   String TAG_SFSB_INVOCATION = "SFSB";
+   String TAG_SFSB_INVOCATION = "SFSBInvocation";
 
    /**
     * AOP Metadata Key for SFSB Session ID




More information about the jboss-cvs-commits mailing list