[jboss-cvs] JBossAS SVN: r76249 - 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
Sat Jul 26 21:03:41 EDT 2008
Author: ALRubinger
Date: 2008-07-26 21:03:40 -0400 (Sat, 26 Jul 2008)
New Revision: 76249
Added:
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/InvokableContextProxy.java
Removed:
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/Ejb3PojiProxy.java
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/StatefulSessionProxyFactoryBase.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/handler/session/SessionProxyInvocationHandlerBase.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/objectfactory/ProxyObjectFactory.java
Log:
[EJBTHREE-1345] Move obtaining a new SFSB session to be an in-container invocation
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 2008-07-26 21:46:35 UTC (rev 76248)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionLocalProxyFactory.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -116,38 +116,4 @@
// Return
return handler;
}
-
- /**
- * Obtains the Container used by this Proxy Factory
- *
- * @return The Container for this Proxy Factory
- */
- @Override
- protected StatefulSessionInvokableContext<?> obtainContainer()
- {
- /*
- * Obtain the Container
- */
- StatefulSessionInvokableContext<?> container = null;
- String containerName = this.getContainerName();
-
- // Lookup from EJB3 Registrar
- try
- {
- Object obj = Ejb3RegistrarLocator.locateRegistrar().lookup(containerName);
- assert obj instanceof StatefulSessionInvokableContext : "Container retrieved from "
- + Ejb3Registrar.class.getSimpleName() + " was not of expected type "
- + StatefulSessionInvokableContext.class.getName() + " but was instead " + obj;
- container = (StatefulSessionInvokableContext<?>) obj;
- }
- catch (NotBoundException nbe)
- {
- throw new RuntimeException(StatefulSessionProxyFactory.class.getSimpleName() + " " + this
- + " has defined container name \"" + containerName + "\", but this could not be found in the "
- + Ejb3Registrar.class.getSimpleName());
- }
-
- // Return
- return container;
- }
}
Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionProxyFactoryBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionProxyFactoryBase.java 2008-07-26 21:46:35 UTC (rev 76248)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionProxyFactoryBase.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -25,6 +25,8 @@
import java.lang.reflect.Proxy;
import java.util.Set;
+import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
import org.jboss.ejb3.common.registrar.spi.NotBoundException;
import org.jboss.ejb3.interceptors.container.StatefulSessionContainerMethodInvocation;
import org.jboss.ejb3.proxy.container.StatefulSessionInvokableContext;
@@ -316,8 +318,34 @@
*
* @return The Container for this Proxy Factory
*/
- protected abstract StatefulSessionInvokableContext<?> obtainContainer();
+ protected StatefulSessionInvokableContext<?> obtainContainer()
+ {
+ /*
+ * Obtain the Container
+ */
+ StatefulSessionInvokableContext<?> container = null;
+ String containerName = this.getContainerName();
+ // Lookup from EJB3 Registrar
+ try
+ {
+ Object obj = Ejb3RegistrarLocator.locateRegistrar().lookup(containerName);
+ assert obj instanceof StatefulSessionInvokableContext : "Container retrieved from "
+ + Ejb3Registrar.class.getSimpleName() + " was not of expected type "
+ + StatefulSessionInvokableContext.class.getName() + " but was instead " + obj;
+ container = (StatefulSessionInvokableContext<?>) obj;
+ }
+ catch (NotBoundException nbe)
+ {
+ throw new RuntimeException(StatefulSessionProxyFactory.class.getSimpleName() + " " + this
+ + " has defined container name \"" + containerName + "\", but this could not be found in the "
+ + Ejb3Registrar.class.getSimpleName());
+ }
+
+ // Return
+ return container;
+ }
+
// --------------------------------------------------------------------------------||
// Accessors / Mutators -----------------------------------------------------------||
// --------------------------------------------------------------------------------||
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 2008-07-26 21:46:35 UTC (rev 76248)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/session/stateful/StatefulSessionRemoteProxyFactory.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -32,7 +32,7 @@
import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
import org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandler;
import org.jboss.ejb3.proxy.handler.session.stateful.StatefulRemoteProxyInvocationHandler;
-import org.jboss.ejb3.proxy.remoting.Ejb3PojiProxy;
+import org.jboss.ejb3.proxy.remoting.InvokableContextProxy;
import org.jboss.ejb3.proxy.remoting.IsLocalProxyFactoryInterceptor;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
@@ -151,50 +151,50 @@
return handler;
}
- /**
- * Obtains the Container used by this Proxy Factory
- *
- * @return The Container for this Proxy Factory
- */
- @Override
- protected StatefulSessionInvokableContext<?> obtainContainer()
- {
- /*
- * Obtain the Container
- */
- StatefulSessionInvokableContext<?> container = null;
- String containerName = this.getContainerName();
+// /**
+// * Obtains the Container used by this Proxy Factory
+// *
+// * @return The Container for this Proxy Factory
+// */
+// @Override
+// protected StatefulSessionInvokableContext<?> obtainContainer()
+// {
+// /*
+// * Obtain the Container
+// */
+// StatefulSessionInvokableContext<?> container = null;
+// String containerName = this.getContainerName();
+//
+// // Create an InvokerLocator
+// String url = this.getUrl();
+// assert url != null && !url.trim().equals("") : InvokerLocator.class.getSimpleName()
+// + " URL is required, but is not specified for " + this;
+// InvokerLocator locator = null;
+// try
+// {
+// locator = new InvokerLocator(url);
+// }
+// catch (MalformedURLException e)
+// {
+// throw new RuntimeException(
+// "URL for " + InvokerLocator.class.getSimpleName() + " in " + this + " was improper", e);
+// }
+//
+// // Create a POJI Proxy to the Container
+// Interceptor[] interceptors =
+// {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
+// PojiProxy handler = new InvokableContextProxy(containerName, locator, interceptors);
+// Class<?>[] interfaces = new Class<?>[]
+// {StatefulSessionInvokableContext.class};
+// container = (StatefulSessionInvokableContext<?>) Proxy.newProxyInstance(interfaces[0].getClassLoader(),
+// interfaces, handler);
+// log.debug("Created Remoting Proxy to " + StatefulSessionInvokableContext.class.getSimpleName() + " with name "
+// + containerName + " using URL " + url);
+//
+// // Return
+// return container;
+// }
- // Create an InvokerLocator
- String url = this.getUrl();
- assert url != null && !url.trim().equals("") : InvokerLocator.class.getSimpleName()
- + " URL is required, but is not specified for " + this;
- InvokerLocator locator = null;
- try
- {
- locator = new InvokerLocator(url);
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException(
- "URL for " + InvokerLocator.class.getSimpleName() + " in " + this + " was improper", e);
- }
-
- // Create a POJI Proxy to the Container
- Interceptor[] interceptors =
- {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
- PojiProxy handler = new Ejb3PojiProxy(containerName, locator, interceptors);
- Class<?>[] interfaces = new Class<?>[]
- {StatefulSessionInvokableContext.class};
- container = (StatefulSessionInvokableContext<?>) Proxy.newProxyInstance(interfaces[0].getClassLoader(),
- interfaces, handler);
- log.debug("Created Remoting Proxy to " + StatefulSessionInvokableContext.class.getSimpleName() + " with name "
- + containerName + " using URL " + url);
-
- // Return
- return container;
- }
-
// --------------------------------------------------------------------------------||
// Accessors / Mutators -----------------------------------------------------------||
// --------------------------------------------------------------------------------||
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 2008-07-26 21:46:35 UTC (rev 76248)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionProxyInvocationHandlerBase.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -24,7 +24,10 @@
import java.lang.reflect.Proxy;
import java.net.MalformedURLException;
+import org.jboss.aop.Dispatcher;
import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.aop.util.PayloadKey;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.aspects.remoting.PojiProxy;
import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
@@ -32,7 +35,7 @@
import org.jboss.ejb3.interceptors.container.ContainerMethodInvocation;
import org.jboss.ejb3.proxy.container.InvokableContext;
import org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase;
-import org.jboss.ejb3.proxy.remoting.Ejb3PojiProxy;
+import org.jboss.ejb3.proxy.remoting.InvokableContextProxy;
import org.jboss.ejb3.proxy.remoting.IsLocalProxyFactoryInterceptor;
import org.jboss.logging.Logger;
import org.jboss.remoting.InvokerLocator;
@@ -111,11 +114,11 @@
// Create a POJI Proxy to the Container
Interceptor[] interceptors =
{IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
- PojiProxy handler = new Ejb3PojiProxy(this.getContainerName(), locator, interceptors);
+ PojiProxy handler = new InvokableContextProxy(this.getContainerName(), locator, interceptors);
Class<?>[] interfaces = new Class<?>[]
{InvokableContext.class};
InvokableContext<? extends ContainerMethodInvocation> container = (InvokableContext<?>) Proxy.newProxyInstance(
- interfaces[0].getClassLoader(), interfaces, handler);
+ InvokableContext.class.getClassLoader(), interfaces, handler);
// Return
return container;
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-07-26 21:46:35 UTC (rev 76248)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/SessionSpecProxyInvocationHandlerBase.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -46,7 +46,7 @@
// ------------------------------------------------------------------------------||
private static final Logger log = Logger.getLogger(SessionSpecProxyInvocationHandlerBase.class);
-
+
// ------------------------------------------------------------------------------||
// Instance Members -------------------------------------------------------------||
// ------------------------------------------------------------------------------||
@@ -75,20 +75,20 @@
super();
this.setBusinessInterfaceType(businessInterfaceType);
}
-
+
// ------------------------------------------------------------------------------||
// Required Implementations -----------------------------------------------------||
// ------------------------------------------------------------------------------||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- {
+ {
// Obtain an explicitly-specified actual class
String actualClass = this.getBusinessInterfaceType();
-
+
// Set the invoked method
SerializableMethod invokedMethod = new SerializableMethod(method, actualClass);
this.setInvokedMethod(invokedMethod);
-
+
// Attempt to handle directly
try
{
@@ -97,10 +97,9 @@
// Ignore this, we just couldn't handle here
catch (NotEligibleForDirectInvocationException nefdie)
{
- log.debug("Couldn't handle invocation directly within " + this + ": "
- + nefdie.getMessage());
+ log.debug("Couldn't handle invocation directly within " + this + ": " + nefdie.getMessage());
}
-
+
/*
* Obtain the Container
*/
@@ -109,20 +108,27 @@
/*
* Invoke
*/
-
+
// Adjust args if null to empty array
- if(args==null)
+ if (args == null)
{
- args = new Object[]{};
+ args = new Object[]
+ {};
}
+
+// StatefulRemoteInvocation sri = new StatefulRemoteInvocation(interceptors, hash, method, method, null, id);
+// sri.setArguments(args);
+// sri.setInstanceResolver(metadata);
+// sri.getMetaData().addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, containerId, PayloadKey.AS_IS);
+// sri.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.INVOKER_LOCATOR, uri, PayloadKey.AS_IS);
+// sri.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.SUBSYSTEM, "AOP", PayloadKey.AS_IS);
+// sri.getMetaData().addMetaData(IsLocalInterceptor.IS_LOCAL, IsLocalInterceptor.GUID, containerGuid, PayloadKey.AS_IS);
// Invoke
- log.debug("Invoking: " + invokedMethod + " with arguments " + args + "...");
Object result = container.invoke(proxy, invokedMethod, args);
-
+
// Return
return result;
-
}
// ------------------------------------------------------------------------------||
Modified: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/objectfactory/ProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/objectfactory/ProxyObjectFactory.java 2008-07-26 21:46:35 UTC (rev 76248)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/objectfactory/ProxyObjectFactory.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -43,7 +43,7 @@
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
import org.jboss.ejb3.common.registrar.spi.NotBoundException;
import org.jboss.ejb3.proxy.factory.ProxyFactory;
-import org.jboss.ejb3.proxy.remoting.Ejb3PojiProxy;
+import org.jboss.ejb3.proxy.remoting.InvokableContextProxy;
import org.jboss.ejb3.proxy.remoting.IsLocalProxyFactoryInterceptor;
import org.jboss.logging.Logger;
import org.jboss.remoting.InvokerLocator;
@@ -151,7 +151,7 @@
// Create a POJI Proxy to the Registrar
Interceptor[] interceptors =
{IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
- PojiProxy handler = new Ejb3PojiProxy(proxyFactoryRegistryKey, locator, interceptors);
+ PojiProxy handler = new InvokableContextProxy(proxyFactoryRegistryKey, locator, interceptors);
Class<?>[] interfaces = new Class<?>[]
{this.getProxyFactoryClass()};
proxyFactory = (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
Deleted: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/Ejb3PojiProxy.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/Ejb3PojiProxy.java 2008-07-26 21:46:35 UTC (rev 76248)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/Ejb3PojiProxy.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -1,72 +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.remoting;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.joinpoint.MethodInvocation;
-import org.jboss.aspects.remoting.PojiProxy;
-import org.jboss.remoting.InvokerLocator;
-
-/**
- * Ejb3PojiProxy
- *
- * An EJB3-specific implementation of the Remoting PojiProxy
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class Ejb3PojiProxy extends PojiProxy
-{
- // ------------------------------------------------------------------------------||
- // Class Members ---------------------------------------------------------------||
- // ------------------------------------------------------------------------------||
-
- private static final long serialVersionUID = 1L;
-
- // ------------------------------------------------------------------------------||
- // Constructor ------------------------------------------------------------------||
- // ------------------------------------------------------------------------------||
-
- public Ejb3PojiProxy(Object oid, InvokerLocator uri, Interceptor[] interceptors)
- {
- super(oid, uri, interceptors);
- }
-
- // ------------------------------------------------------------------------------||
- // Overridden Implementations ---------------------------------------------------||
- // ------------------------------------------------------------------------------||
-
- //TODO Needs new release of jboss-remoting-aspects
-// /**
-// * Adds EJB3-specific metadata to the invocation before it's made
-// */
-// @Override
-// protected void addMetadataToInvocation(MethodInvocation methodInvocation)
-// {
-// // Call Super
-// super.addMetadataToInvocation(methodInvocation);
-//
-// // Add metadata for the IsLocalProxyFactoryInterceptor
-// //TODO
-//
-// }
-}
Copied: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/InvokableContextProxy.java (from rev 76208, projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/Ejb3PojiProxy.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/InvokableContextProxy.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/InvokableContextProxy.java 2008-07-27 01:03:40 UTC (rev 76249)
@@ -0,0 +1,130 @@
+/*
+ * 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;
+
+import java.lang.reflect.Method;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.aop.util.MethodHashing;
+import org.jboss.aspects.remoting.PojiProxy;
+import org.jboss.ejb3.common.lang.SerializableMethod;
+import org.jboss.remoting.InvokerLocator;
+
+/**
+ * InvokableContextProxy
+ *
+ * An EJB3-specific implementation of the Remoting PojiProxy
+ * for an InvokableContext, responsible for rewriting the target method
+ * "invoke" with that specified as the method to invoke
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class InvokableContextProxy extends PojiProxy
+{
+ // ------------------------------------------------------------------------------||
+ // Class Members ---------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ // ------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ public InvokableContextProxy(Object oid, InvokerLocator uri, Interceptor[] interceptors)
+ {
+ super(oid, uri, interceptors);
+ }
+
+ // ------------------------------------------------------------------------------||
+ // Overridden Implementations ---------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ //TODO Pending Release of jboss-remoting-aspects, stalled by failed build
+// /**
+// * Adds EJB3-specific metadata to the invocation before it's made
+// */
+// @Override
+// protected void addMetadataToInvocation(MethodInvocation methodInvocation)
+// {
+// // Call Super
+// super.addMetadataToInvocation(methodInvocation);
+//
+// // Add metadata for the IsLocalProxyFactoryInterceptor
+// //TODO
+//
+// }
+
+ //TODO Pending Release of jboss-remoting-aspects, stalled by failed build
+// /**
+// * Proceed with the invocation upon InvokableContext.invoke(),
+// * setting the target method
+// */
+// @Override
+// public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+// {
+// MethodInvocation sri = this.constructMethodInvocation(method, args);
+// sri.setArguments(args);
+// this.addMetadataToInvocation(sri);
+// return sri.invokeNext();
+// }
+
+ //TODO Pending Release of jboss-remoting-aspects, stalled by failed build
+// /**
+// * Constructs a MethodInvocation from the specified Method and
+// * arguments
+// *
+// * @param method
+// * @param args
+// * @return
+// */
+// /*
+// * Hack Smell, this would not be necessary if the Container could
+// * resolve InvokableContext.invoke()'s methodHash from the advisor.getMethodInfo(hash).
+// *
+// * Code review requested by ALR
+// */
+// @Override
+// protected MethodInvocation constructMethodInvocation(Method method, Object[] args)
+// {
+// // Some sanity checks
+// assert args.length == 3; // InvokableContext.invoke(Object proxy, SerializableMethod method, Object[] args)
+// Object targetMethodArg = args[1];
+// assert targetMethodArg instanceof SerializableMethod : "Second argument expected to be "
+// + SerializableMethod.class.getName();
+// assert targetMethodArg != null : "Target method may not be null";
+//
+// // Get the target method
+// SerializableMethod targetMethod = (SerializableMethod) targetMethodArg;
+// Method realizedMethod = targetMethod.toMethod();
+//
+// // Create and invoke upon a MethodInvocation
+// long hash = MethodHashing.calculateHash(realizedMethod);
+// MethodInvocation sri = new MethodInvocation(this.getInterceptors(), hash, realizedMethod, realizedMethod, null);
+//
+// // Return
+// return sri;
+// }
+
+}
More information about the jboss-cvs-commits
mailing list