[jboss-cvs] JBossAS SVN: r83940 - in projects/ejb3/trunk/core: src/main/java/org/jboss/ejb3 and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Feb 6 05:45:40 EST 2009
Author: ALRubinger
Date: 2009-02-06 05:45:40 -0500 (Fri, 06 Feb 2009)
New Revision: 83940
Removed:
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/asynchronous/
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/JBossProxy.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/SessionProxyFactory.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerDeprecated.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/
Modified:
projects/ejb3/trunk/core/pom.xml
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java
projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml
projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/regression/ejbthree1253/unit/OverriddenProxyFactoryTestCase.java
Log:
[EJBTHREE-1695][EJBTHREE-1641] Remove ejb3-core dependency upon ejb3-async, clean up after old proxy implementation (These tasks are tangled in one another, so doing the big-diff sledgehammer approach)
Modified: projects/ejb3/trunk/core/pom.xml
===================================================================
--- projects/ejb3/trunk/core/pom.xml 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/pom.xml 2009-02-06 10:45:40 UTC (rev 83940)
@@ -342,12 +342,6 @@
</exclusion>
</exclusions>
</dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-async</artifactId>
- <version>1.0.0</version>
- </dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -121,7 +121,6 @@
private MessageDestinationReferenceResolver messageDestinationReferenceResolver = new DefaultMessageDestinationReferenceResolver();
protected CacheFactoryRegistry cacheFactoryRegistry;
- protected RemoteProxyFactoryRegistry remoteProxyFactoryRegistry;
protected PersistenceManagerFactoryRegistry persistenceManagerFactoryRegistry;
protected PoolFactoryRegistry poolFactoryRegistry;
@@ -207,13 +206,17 @@
this.cacheFactoryRegistry = registry;
}
+ @Deprecated
public RemoteProxyFactoryRegistry getRemoteProxyFactoryRegistry()
{
- return remoteProxyFactoryRegistry;
+ log.warn("[EJBTHREE-1641] NoOp getRemoteProxyFactoryRegistry; developers may ignore this message; it will be removed when backwards-compatibility between EJB3 and AS is resolved");
+ return null;
}
+
+ @Deprecated
public void setRemoteProxyFactoryRegistry(RemoteProxyFactoryRegistry registry)
{
- this.remoteProxyFactoryRegistry = registry;
+ log.warn("[EJBTHREE-1641] NoOp setRemoteProxyFactoryRegistry; developers may ignore this message; it will be removed when backwards-compatibility between EJB3 and AS is resolved");
}
public PersistenceManagerFactoryRegistry getPersistenceManagerFactoryRegistry()
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.lang.reflect.InvocationHandler;
-
-import org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandler;
-import org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerDeprecated;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public abstract class LocalProxyInvocationHandler extends BaseProxyInvocationHandler implements InvocationHandler, Externalizable, ProxyInvocationHandlerDeprecated
-{
- private static Logger log = Logger.getLogger(LocalProxyInvocationHandler.class);
-
- private transient Container container = null;
-
- protected String containerClusterUid;
-
- protected String containerGuid;
-
- protected String proxyName;
-
- protected LocalProxyInvocationHandler()
- {
- }
-
- protected LocalProxyInvocationHandler(Container container, String businessInterfaceType)
- {
- this.setBusinessInterfaceType(businessInterfaceType);
- this.container = container;
- this.containerGuid = Ejb3Registry.guid(container);
- this.containerClusterUid = Ejb3Registry.clusterUid(container);
- proxyName = container.getEjbName();
- }
-
- protected Container getContainer()
- {
- if (container == null)
- container = Ejb3Registry.findContainer(containerGuid);
- if (container == null)
- log.warn("Container " + containerGuid + " is not yet available");
- return container;
- }
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- this.containerGuid = in.readUTF();
- this.containerClusterUid = in.readUTF();
- this.proxyName = in.readUTF();
- }
-
- public void writeExternal(ObjectOutput out) throws IOException
- {
- out.writeUTF(containerGuid);
- out.writeUTF(containerClusterUid);
- out.writeUTF(proxyName);
- }
-
- public abstract String toString();
-
-}
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -38,8 +38,8 @@
import org.jboss.ejb3.annotation.Producer;
import org.jboss.ejb3.annotation.Producers;
import org.jboss.ejb3.annotation.impl.ProducerImpl;
+import org.jboss.ejb3.proxy.JndiSessionProxyObjectFactory;
import org.jboss.ejb3.proxy.ProxyFactory;
-import org.jboss.ejb3.proxy.JndiSessionProxyObjectFactory;
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -34,7 +34,7 @@
import org.jboss.ejb3.Container;
import org.jboss.ejb3.annotation.MessageProperties;
import org.jboss.ejb3.proxy.ProxyFactory;
-import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
+import org.jboss.ejb3.proxy.remoting.ProxyRemotingUtils;
import org.jboss.util.naming.Util;
/**
@@ -83,7 +83,7 @@
{
super.start();
Class[] interfaces = {ProxyFactory.class};
- Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, RemoteProxyFactory.DEFAULT_CLIENT_BINDING);
+ Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, ProxyRemotingUtils.getDefaultClientBinding());
try
{
Util.rebind(ctx, jndiName + PROXY_FACTORY_NAME, factoryProxy);
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/JBossProxy.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/JBossProxy.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/JBossProxy.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-/**
- *
- *
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision$
- */
-public interface JBossProxy
-{
- Object getAsynchronousProxy();
-}
\ No newline at end of file
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,162 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-
-import javax.ejb.EJBHome;
-import javax.ejb.EJBObject;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.joinpoint.MethodInvocation;
-import org.jboss.aop.util.MethodHashing;
-import org.jboss.aop.util.PayloadKey;
-import org.jboss.aspects.asynch.AsynchMixin;
-import org.jboss.aspects.asynch.AsynchProvider;
-import org.jboss.aspects.asynch.AsynchProxyInterceptor;
-import org.jboss.aspects.asynch.FutureHolder;
-import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
-import org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerDeprecated;
-
-/**
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision$
- */
-public class ProxyUtils
-{
- public final static Class<AsynchProvider> ASYNCH_PROVIDER_CLASS = AsynchProvider.class;
- public final static long GET_ASYNCHRONOUS;
- public static final long TO_STRING;
- public static final long EQUALS;
- public static final long HASHCODE;
- public static final Method GET_PRIMARY_KEY;
- public static final Method GET_HANDLE;
- public static final Method GET_EJB_HOME;
- public static final Method IS_IDENTICAL;
- public static final Method GET_HOME_HANDLE;
- public static final Method GET_EJB_METADATA;
- public static final Method REMOVE;
-
- static
- {
- try
- {
- Class<?>[] empty = {};
-
- Method method = JBossProxy.class.getMethod("getAsynchronousProxy", empty);
- GET_ASYNCHRONOUS = MethodHashing.calculateHash(method);
- TO_STRING = MethodHashing.calculateHash(Object.class.getDeclaredMethod("toString", empty));
- EQUALS = MethodHashing.calculateHash(Object.class.getDeclaredMethod("equals", new Class<?>[]{Object.class}));
- HASHCODE = MethodHashing.calculateHash(Object.class.getDeclaredMethod("hashCode", empty));
-
- GET_PRIMARY_KEY = EJBObject.class.getMethod("getPrimaryKey", empty);
- GET_HANDLE = EJBObject.class.getMethod("getHandle", empty);
- GET_EJB_HOME = EJBObject.class.getMethod("getEJBHome", empty);
- IS_IDENTICAL = EJBObject.class.getMethod("isIdentical", new Class<?>[] { EJBObject.class });
- REMOVE = EJBObject.class.getMethod("remove", empty);
-
- GET_HOME_HANDLE = EJBHome.class.getMethod("getHomeHandle", empty);
- GET_EJB_METADATA = EJBHome.class.getMethod("getEJBMetaData", empty);
- }
- catch (NoSuchMethodException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public static boolean isAsynchronous(Class<?>[] infs)
- {
- for (int i = 0; i < infs.length; i++)
- {
- if (infs[i] == ASYNCH_PROVIDER_CLASS)
- {
- return true;
- }
- }
- return false;
- }
-
- public static Class<?>[] addAsynchProviderInterface(Class<?>[] infs)
- {
- ArrayList<Class<?>> interfaces = new ArrayList<Class<?>>();
-
- for (int i = 0; i < infs.length; i++)
- {
- if (infs[i] == ASYNCH_PROVIDER_CLASS)
- {
- //This should not happen
- continue;
- }
- interfaces.add(infs[i]);
- }
-
- interfaces.add(ASYNCH_PROVIDER_CLASS);
- return (Class<?>[]) interfaces.toArray(new Class<?>[interfaces.size()]);
- }
-
- public static Interceptor[] addAsynchProxyInterceptor(AsynchMixin mixin, Interceptor[] interceptors)
- {
- AsynchProxyInterceptor interceptor = new AsynchProxyInterceptor(mixin);
- Interceptor[] newInterceptors = null;
- newInterceptors = new Interceptor[interceptors.length + 1];
- newInterceptors[0] = interceptor;
- System.arraycopy(interceptors, 0, newInterceptors, 1, interceptors.length);
- return newInterceptors;
- }
-
- public static void addLocalAsynchronousInfo(MethodInvocation invocation, FutureHolder provider)
- {
- if (provider != null)
- {
- invocation.getMetaData().addMetaData(AsynchronousInterceptor.ASYNCH, AsynchronousInterceptor.INVOKE_ASYNCH, "YES", PayloadKey.AS_IS);
- invocation.getMetaData().addMetaData(AsynchronousInterceptor.ASYNCH, AsynchronousInterceptor.FUTURE_HOLDER, provider, PayloadKey.AS_IS);
- }
- }
-
- public static Object handleCallLocally(Object jbproxy, ProxyInvocationHandlerDeprecated ih, Method m, Object[] args)
- {
- long hash = MethodHashing.calculateHash(m);
- return handleCallLocally(hash, jbproxy, ih, m, args);
- }
-
- public static Object handleCallLocally(long hash, Object jbproxy, ProxyInvocationHandlerDeprecated ih, Method m, Object[] args)
- {
- if (hash == ProxyUtils.GET_ASYNCHRONOUS)
- {
- return ih.getAsynchronousProxy((JBossProxy)jbproxy);
- }
- else if (hash == TO_STRING)
- {
- return ih.toString();
- }
- else if (hash == HASHCODE)
- {
- return new Integer(ih.toString().hashCode());
- }
- else if (hash == EQUALS)
- {
- return new Boolean(ih.toString().equals(args[0].toString()));
- }
- return null;
- }
-}
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,714 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.factory;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.ejb.EJBException;
-import javax.ejb.EJBHome;
-import javax.ejb.EJBLocalHome;
-import javax.ejb.EJBLocalObject;
-import javax.ejb.EJBMetaData;
-import javax.ejb.EJBObject;
-import javax.ejb.Handle;
-import javax.ejb.HomeHandle;
-import javax.ejb.RemoteHome;
-import javax.naming.NamingException;
-
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.SpecificationInterfaceType;
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.proxy.JBossProxy;
-import org.jboss.ejb3.proxy.handler.BaseSessionRemoteProxyInvocationHandler;
-import org.jboss.ejb3.proxy.impl.EJBMetaDataImpl;
-import org.jboss.ejb3.proxy.impl.HomeHandleImpl;
-import org.jboss.ejb3.session.ProxyAccessType;
-import org.jboss.ejb3.session.SessionContainer;
-import org.jboss.ejb3.session.SessionSpecContainer;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossSessionBeanJndiNameResolver;
-import org.jboss.metadata.ejb.spec.BusinessLocalsMetaData;
-import org.jboss.metadata.ejb.spec.BusinessRemotesMetaData;
-import org.jboss.util.naming.Util;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version $Revision$
- */
-public abstract class BaseSessionProxyFactory implements SessionProxyFactory, Externalizable
-{
- @SuppressWarnings("unused")
- private static final Logger log = Logger.getLogger(BaseSessionProxyFactory.class);
-
- private static final String JNDI_NAME_SUFFIX_PROXY_FACTORY = "/ProxyFactory";
-
- private SessionSpecContainer container;
- protected String containerGuid;
- protected String containerClusterUid;
- protected boolean isClustered = false;
- protected String jndiName;
-
- /**
- * Proxy Constructor for the Business Interfaces' Proxy
- */
- protected Constructor<?> businessProxyConstructor;
-
- /**
- * Proxy Constructor for the EJBObject/EJBLocalObject Proxy
- */
- protected Constructor<?> ejb21ProxyConstructor;
-
- private static final String METHOD_PREFIX_EJB21_CREATE = "create";
-
- public BaseSessionProxyFactory()
- {
- }
-
- protected BaseSessionProxyFactory(SessionSpecContainer container)
- {
- assert container != null : "container is null";
-
- setContainer(container);
- }
-
- public Object createHomeProxy()
- {
- throw new RuntimeException("NYI");
- }
-
- /**
- * Creates the Proxy constructors
- */
- protected void createProxyConstructors() throws Exception
- {
- // Obtain this bean class' CL
- ClassLoader cl = this.getContainer().getBeanClass().getClassLoader();
-
- // Create business proxy constructor
- Class<?>[] businessInterfaces = this.getInterfacesForBusinessProxy();
- this.businessProxyConstructor = ProxyFactoryHelper.createProxyConstructor(businessInterfaces, cl);
-
- // Create EJB21 proxy constructor
- Class<?>[] ejb21Interfaces = this.getInterfacesForEjb21Proxy();
- if (ejb21Interfaces != null)
- {
- this.ejb21ProxyConstructor = ProxyFactoryHelper.createProxyConstructor(ejb21Interfaces, cl);
- }
-
-
- /* plain jdk
- Class<?> proxyClass = java.lang.reflect.Proxy.getProxyClass(getContainer().getBeanClass().getClassLoader(), interfaces);
- final Class<?>[] constructorParams =
- {InvocationHandler.class};
- businessProxyConstructor = proxyClass.getConstructor(constructorParams);
-
- */
-
- /* javassist */
- /*
- proxyFactory = new javassist.util.proxy.ProxyFactory()
- {
- @Override
- protected ClassLoader getClassLoader()
- {
- return container.getBeanClass().getClassLoader();
- }
- };
- proxyFactory.setInterfaces(interfaces);
- proxyFactory.setSuperclass(JavassistProxy.class);
- proxyClass = proxyFactory.createClass();
- proxyConstructor = proxyClass.getConstructor((Class[]) null);
- */
-
- /* cglib */
- /*
- proxyClass = net.sf.cglib.proxy.Proxy.getProxyClass(container.getBeanClass().getClassLoader(), interfaces);
- final Class[] constructorParams = {net.sf.cglib.proxy.InvocationHandler.class};
- proxyConstructor = proxyClass.getConstructor(constructorParams);
- */
- }
-
- protected void bindProxy(Object proxy) throws NamingException
- {
- try
- {
- //TODO Dev
-// // Bind the Proxy Factory if not yet bound
-// try
-// {
-// // Check if bound yet
-// Util.lookup(this.getJndiNameProxyFactory(), this.getClass());
-// }
-// // Proxy factory is not yet bound
-// catch(NameNotFoundException nnfe)
-// {
-// // Bind Proxy Factory
-// log.debug("Binding proxy factory " + this.toString() + " for " + this.getContainer().getEjbName()
-// + " in JNDI at " + this.getJndiNameProxyFactory());
-// Util.rebind(this.getContainer().getInitialContext(), this.getJndiNameProxyFactory(), this);
-// }
-// // Unexpected Exception
-// catch (Exception e)
-// {
-// throw new RuntimeException(e);
-// }
-
- // Bind the proxy itself
- log.debug("Binding proxy for " + getContainer().getEjbName() + " in JNDI at " + this.getJndiName());
- Util.rebind(getContainer().getInitialContext(), this.getJndiName(), proxy);
-
- // Bind a proxy per business interface
- //TODO This ugly block should be using polymorphism, but I'll allow it as the proxy mechanism
- // is going to be replaced entirely by EJB3 Proxy soon
- JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData) container.getXml();
- BusinessRemotesMetaData remotes = smd.getBusinessRemotes();
- BusinessLocalsMetaData locals = smd.getBusinessLocals();
- Set<String> businessInterfaces = new HashSet<String>();
- boolean isLocal = this.isLocal();
- if (!isLocal)
- {
- if (remotes != null)
- {
- businessInterfaces.addAll(remotes);
- }
- }
- else
- {
- if (locals != null)
- {
- businessInterfaces.addAll(locals);
- }
- }
- for (String businessInterface : businessInterfaces)
- {
- String jndiName = JbossSessionBeanJndiNameResolver.resolveJndiName(smd, businessInterface);
- log.debug("Binding proxy for " + getContainer().getEjbName() + ", interface " + businessInterface
- + " in JNDI at " + jndiName);
- if (Proxy.isProxyClass(proxy.getClass()))
- {
- for (Class<?> in : proxy.getClass().getInterfaces())
- {
- log.debug("Proxy Interface for JNDI Name " + jndiName + ": " + in);
- }
- }
- Util.rebind(this.getContainer().getInitialContext(), jndiName, proxy);
- }
-
-
- } catch (NamingException e)
- {
- NamingException namingException = new NamingException("Could not bind session proxy with ejb name "
- + getContainer().getEjbName() + " into JNDI under jndiName: "
- + getContainer().getInitialContext().getNameInNamespace() + "/" + this.getJndiName());
- namingException.setRootCause(e);
- throw namingException;
- }
- }
-
-
- /**
- * Returns whether this Proxy Factory is local. A Hack until EJB3 Proxy
- * is in place, but this keeps us moving forward easily.
- *
- * @deprecated Hack
- * @return
- */
- @Deprecated
- protected boolean isLocal()
- {
- return false;
- }
-
- /**
- * Whether or not to bind the home and business interfaces together
- *
- * @return
- */
- protected abstract boolean bindHomeAndBusinessTogether();
-
- protected Object constructProxyBusiness(InvocationHandler handler)
- {
- // Return
- return this.constructProxy(handler, SpecificationInterfaceType.EJB30_BUSINESS);
- }
-
- protected Object constructEjb21Proxy(InvocationHandler handler)
- {
- // Return
- return this.constructProxy(handler, SpecificationInterfaceType.EJB21);
- }
-
- /**
- * Construct a new Proxy of the specified type using the
- * specified handler as argument to the Constructor
- *
- * @param handler
- * @param specType
- * @return
- */
- protected Object constructProxy(final InvocationHandler handler, SpecificationInterfaceType specType)
- {
- // Initialize
- Object obj = null;
-
- try
- {
- // Business Proxy
- if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
- {
- obj = this.businessProxyConstructor.newInstance(handler);
- }
- // EJBObject/EJBLocalObject
- else if (specType.equals(SpecificationInterfaceType.EJB21))
- {
- // If there's no EJB21 View
- if (this.ejb21ProxyConstructor == null)
- {
- throw new IllegalStateException(
- "EJB3 Specification Violation Section 4.3.3: \""
- + "Only session beans with a remote EJBObject / local EJBLocalObject interface can call this method.");
- }
-
- obj = this.ejb21ProxyConstructor.newInstance(handler);
- }
- }
- catch (InstantiationException e)
- {
- throw new RuntimeException(e);
- }
- catch (IllegalAccessException e)
- {
- throw new RuntimeException(e);
- }
- catch (InvocationTargetException e)
- {
- Throwable t = e.getTargetException();
- if (t instanceof RuntimeException)
- throw (RuntimeException) t;
- throw new RuntimeException(t);
- }
-
- // Ensure Proxy object was created
- assert obj != null : "Proxy Object must not be null";
-
- // Return
- return obj;
- }
-
-
- protected void setContainer(SessionSpecContainer container)
- {
- this.container = container;
- this.containerGuid = Ejb3Registry.guid(container);
- this.containerClusterUid = Ejb3Registry.clusterUid(container);
- this.isClustered = container.isClustered();
- }
-
- protected SessionSpecContainer getContainer()
- {
- if (container == null)
- {
- container = (SessionSpecContainer)Ejb3Registry.findContainer(containerGuid);
-
- if (container == null && isClustered)
- container = (SessionSpecContainer)Ejb3Registry.getClusterContainer(containerClusterUid);
- }
-
- return container;
- }
-
- /**
- * Obtains interfaces to be used in the business proxy
- *
- * @return
- */
- protected Class<?>[] getInterfacesForBusinessProxy()
- {
- return this.getInterfacesForProxy(this.getProxyAccessType(), SpecificationInterfaceType.EJB30_BUSINESS);
- }
-
- /**
- * Obtains interfaces to be used in the EJB21 proxy. Returns null if none defined
- *
- * @return
- */
- protected Class<?>[] getInterfacesForEjb21Proxy()
- {
- return this.getInterfacesForProxy(this.getProxyAccessType(), SpecificationInterfaceType.EJB21);
- }
-
- /**
- * Returns an array of interfaces to be used for the proxy;
- * will return null if none are defined.
- *
- * @param accessType
- * @param specType
- * @return
- */
- private Class<?>[] getInterfacesForProxy(ProxyAccessType accessType, SpecificationInterfaceType specType)
- {
-
- // Initialize
- Set<Class<?>> interfaces = new HashSet<Class<?>>();
- SessionContainer container = this.getContainer();
-
- // Initialize array of interfaces
- Set<Class<?>> intfs = new HashSet<Class<?>>();
-
- // If Local
- if (accessType.equals(ProxyAccessType.LOCAL))
- {
-
- // If business
- if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
- {
- intfs.addAll(Arrays.asList(ProxyFactoryHelper.getLocalBusinessInterfaces(container)));
-
- // If binding home with local business
- if(this.bindHomeAndBusinessTogether())
- {
- Class<?> home = this.getHomeType();
- if (home != null)
- {
- intfs.add(home);
- }
- }
- }
- // If EJBLocalObject
- else
- {
- // Add local interfaces
- intfs.addAll(Arrays.asList(ProxyFactoryHelper.getLocalInterfaces(container)));
-
- // If no interfaces
- if (intfs.size() == 0)
- {
- return null;
- }
-
- // Add EJBLocalObject
- intfs.add(EJBLocalObject.class);
- }
- }
- // If remote
- else
- {
- // If business
- if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
- {
- intfs.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteBusinessInterfaces(container)));
-
- // If binding home with remote business
- if(this.bindHomeAndBusinessTogether())
- {
- Class<?> home = this.getHomeType();
- if (home != null)
- {
- intfs.add(home);
- }
- }
-
- }
- // If EJBObject
- else
- {
- // Add remote interfaces
- intfs.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteInterfaces(container)));
-
- // If no interfaces
- if (intfs.size() == 0)
- {
- return null;
- }
-
- // Add EJBObject
- intfs.add(EJBObject.class);
- }
- }
-
- // Add all interfaces
- for (Class<?> interfaze : intfs)
- {
- interfaces.add(interfaze);
- }
-
- // Add JBossProxy
- interfaces.add(JBossProxy.class);
-
- // Return
- return interfaces.toArray(new Class[]
- {});
- }
-
- /**
- * Defines the access type for this Proxies created by this Factory
- *
- * @return
- */
- protected abstract ProxyAccessType getProxyAccessType();
-
- protected void setEjb21Objects(BaseSessionRemoteProxyInvocationHandler proxy)
- {
- proxy.setHandle(this.createHandle());
- proxy.setHomeHandle(getHomeHandle());
- proxy.setEjbMetaData(getEjbMetaData());
- }
-
- abstract protected Handle createHandle();
-
- protected HomeHandle getHomeHandle()
- {
- EJBContainer ejbContainer = (EJBContainer)container;
-
- HomeHandleImpl homeHandle = null;
-
- RemoteBinding remoteBindingAnnotation = ejbContainer.getAnnotation(RemoteBinding.class);
- if (remoteBindingAnnotation != null)
- homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(container));
-
- return homeHandle;
- }
-
- /**
- * Returns the interface type for Home
- *
- * @return
- */
- protected abstract Class<?> getHomeType();
-
- protected String getJndiName()
- {
- SessionSpecContainer container = this.getContainer();
- JBossSessionBeanMetaData md = container.getMetaData();
- String jndiName = md.determineResolvedJndiName(null);
- return jndiName;
- }
-
- protected String getHomeJndiName()
- {
- SessionSpecContainer container = this.getContainer();
- JBossSessionBeanMetaData md = container.getMetaData();
- String home = md.getHome();
- String jndiName = md.determineResolvedJndiName(home);
- return jndiName;
- }
-
- public final String getJndiNameProxyFactory()
- {
- return this.getJndiName() + BaseSessionProxyFactory.JNDI_NAME_SUFFIX_PROXY_FACTORY;
- }
-
- protected EJBMetaData getEjbMetaData()
- {
- Class<?> remote = null;
- Class<?> home = null;
- Class<?> pkClass = Object.class;
- HomeHandleImpl homeHandle = null;
-
- EJBContainer ejbContainer = (EJBContainer)container;
-
- Class<?>[] remotes = ProxyFactoryHelper.getRemoteInterfaces(this.getContainer());
- if (remotes != null && remotes.length > 0)
- {
- remote = remotes[0];
- }
- RemoteHome homeAnnotation = ejbContainer.getAnnotation(RemoteHome.class);
- if (homeAnnotation != null)
- home = homeAnnotation.value();
- RemoteBinding remoteBindingAnnotation = ejbContainer.getAnnotation(RemoteBinding.class);
- if (remoteBindingAnnotation != null)
- homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding());
-
- EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);
-
- return metadata;
- }
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- containerGuid = in.readUTF();
- containerClusterUid = in.readUTF();
- isClustered = in.readBoolean();
-
- if (getContainer() == null)
- throw new EJBException("Invalid (i.e. remote) invocation of local interface (null container) for " + containerGuid);
- }
-
- public void writeExternal(ObjectOutput out) throws IOException
- {
- out.writeUTF(containerGuid);
- out.writeUTF(containerClusterUid);
- out.writeBoolean(isClustered);
- }
-
- /**
- * Ensures that an EJB 2.1 view is complete; the following rules apply:
- *
- * 1) If EJBHome/EJBLocalHome is defined, at least one EJBObject/EJBLocalObject is defined.
- * 2) If one EJBObject/EJBLocalObject is defined, an EJBHome/EJBLocalHome is defined.
- *
- * @param home
- * @param localOrRemoteInterfaces
- * @throws RuntimeException
- */
- protected void validateCompleteEjb21View(Class<?> home, Class<?>[] localOrRemoteInterfaces) throws RuntimeException
- {
- // Ensure specified home is EJBHome or EJBLocalHome
- assert (home == null || (EJBHome.class.isAssignableFrom(home) || EJBLocalHome.class.isAssignableFrom(home)));
-
- // Ensure all interfaces passed are either EJBObject or EJBLocalObject
- for (Class<?> localOrRemoteInterface : localOrRemoteInterfaces)
- {
- assert (EJBObject.class.isAssignableFrom(localOrRemoteInterface) || EJBLocalObject.class
- .isAssignableFrom(localOrRemoteInterface));
- }
-
- // If home is defined and there are no local/remote interfaces
- if (home != null && localOrRemoteInterfaces.length == 0)
- {
- throw new RuntimeException("EJBTHREE-1075: " + container.getBeanClassName() + " defines home"
- + " but provides no local/remote interfaces extending " + EJBLocalObject.class.getName() + "/"
- + EJBObject.class.getName() + "; EJB 2.1 view cannot be realized");
- }
-
- // If local/remote interfaces are defined, but no remote home
- if (home == null && localOrRemoteInterfaces.length != 0)
- {
- throw new RuntimeException("EJBTHREE-1075: " + container.getBeanClassName()
- + " defines local/remote interfaces" + " but provides no home; EJB 2.1 view cannot be realized");
- }
- }
-
- /**
- * Validates that the specified EJB2.1 Home interface returns only
- * valid remote/local interfaces from "create<METHOD>" methods. If no
- * home is defined, the method will return without further checks
- *
- * @param home
- */
- protected void validateHomeReturnsNoBusinessInterfaces(Class<?> home)
- {
- // Only perform if home is defined; otherwise no EJB2.1 view
- if(home==null)
- {
- return;
- }
-
- // Sanity checks
- assert EJBHome.class.isAssignableFrom(home) || EJBLocalHome.class.isAssignableFrom(home) : "Specified home interface, "
- + home.getName() + ", must be of type " + EJBHome.class.getName() + " or " + EJBLocalHome.class.getName();
- assert home.isInterface() : "Specified home interface, " + home.getName() + " is not an interface.";
-
- // Initialize
- Set<Method> creates = new HashSet<Method>();
-
- // Obtain all "create<METHOD>" methods
- Method[] all = home.getDeclaredMethods();
-
- // For each method
- for (Method method : all)
- {
- // If a "create<METHOD>" method
- if (method.getName().startsWith(BaseSessionProxyFactory.METHOD_PREFIX_EJB21_CREATE))
- {
- // Add to the Set of Creates
- creates.add(method);
- }
- }
-
- // For all "create<METHOD>" methods
- for (Method create : creates)
- {
- // Init
- boolean isLocal = true;
-
- // Set as remote if applicable
- if (EJBHome.class.isAssignableFrom(home))
- {
- isLocal = false;
- }
-
- // If local (EJBLocalHome)
- if (isLocal)
- {
- // Validate return type is local interface
- if (!EJBLocalObject.class.isAssignableFrom(create.getReturnType()))
- {
- throw new RuntimeException("EJB 3 Core Specification Section 4.6.10: "
- + "The return type for a create<METHOD> method must be"
- + " the session bean's local interface type. " + home.getName() + " has method "
- + create.getName() + " which returns " + create.getReturnType().getName() + ". [EJBTHREE-1059]");
- }
- }
- // If remote (EJBHome)
- else
- {
- // Validate return type is remote interface
- if (!EJBObject.class.isAssignableFrom(create.getReturnType()))
- {
- throw new RuntimeException("EJB 3 Core Specification Section 4.6.8: "
- + "The return type for a create<METHOD> method "
- + "must be the session bean’s remote interface type. " + home.getName() + " has method "
- + create.getName() + " which returns " + create.getReturnType().getName() + ". [EJBTHREE-1059]");
- }
- }
- }
- }
-
- /**
- * Validates that any EJB2.1 Views associated with this ProxyFactory
- * are valid
- *
- * @param home
- * @param localOrRemoteInterfaces
- * @throws RuntimeException
- */
- protected void validateEjb21Views(Class<?> home,Class<?>[] localOrRemoteInterfaces) throws RuntimeException
- {
- // Ensure EJB2.1 Views are complete (EJBTHREE-1075)
- this.validateCompleteEjb21View(home, localOrRemoteInterfaces);
-
- // Ensure EJB2.1 Home returns only local/remote interfaces
- this.validateHomeReturnsNoBusinessInterfaces(home);
- }
-
- /**
- * Validates that any EJB2.1 Views associated with this ProxyFactory
- * are valid
- */
- protected abstract void validateEjb21Views();
-}
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -774,67 +774,67 @@
return types;
}
- public static String getClientBindUrl(RemoteBinding binding) throws Exception
- {
- String clientBindUrl = binding.clientBindUrl();
- if (clientBindUrl.trim().length() == 0)
- {
- if (binding.invokerName()!=null && binding.invokerName().trim().length() != 0)
- {
- try
- {
- ObjectName connectionON = new ObjectName(binding.invokerName());
- KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
- clientBindUrl = (String)kernelAbstraction.getAttribute(connectionON, "InvokerLocator");
- }
- catch (Exception e)
- {
- log.warn("Unable to find InvokerLocator " + binding.invokerName() + ". Using default. " + e);
- clientBindUrl = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
- }
- }
- else
- {
- try
- {
- ObjectName connectionON = new ObjectName("jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3");
- KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
- clientBindUrl = (String)kernelAbstraction.getAttribute(connectionON, "InvokerLocator");
- }
- catch (Exception e)
- {
- log.warn("Unable to find default InvokerLocator. Using default. " + e);
- clientBindUrl = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
- }
- }
- }
- else if (clientBindUrl.indexOf("0.0.0.0") != -1)
- {
- KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
- ObjectName query = new ObjectName("jboss.remoting:type=Connector,handler=ejb3,*");
- Set mbeanSet = kernelAbstraction.getMBeans(query);
-
- URI targetUri = new URI(clientBindUrl);
- Iterator mbeans = mbeanSet.iterator();
- while (mbeans.hasNext())
- {
- ObjectInstance invokerInstance = (ObjectInstance)mbeans.next();
- ObjectName invokerName = invokerInstance.getObjectName();
- String invokerLocator = (String)kernelAbstraction.getAttribute(invokerName, "InvokerLocator");
- URI uri = new URI(invokerLocator);
-
- if (uri.getScheme().equals(targetUri.getScheme()) && uri.getPort() == targetUri.getPort())
- {
- return invokerLocator;
- }
- }
- }
-
- if (clientBindUrl == null)
- clientBindUrl = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
-
- return clientBindUrl;
- }
+// public static String getClientBindUrl(RemoteBinding binding) throws Exception
+// {
+// String clientBindUrl = binding.clientBindUrl();
+// if (clientBindUrl.trim().length() == 0)
+// {
+// if (binding.invokerName()!=null && binding.invokerName().trim().length() != 0)
+// {
+// try
+// {
+// ObjectName connectionON = new ObjectName(binding.invokerName());
+// KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
+// clientBindUrl = (String)kernelAbstraction.getAttribute(connectionON, "InvokerLocator");
+// }
+// catch (Exception e)
+// {
+// log.warn("Unable to find InvokerLocator " + binding.invokerName() + ". Using default. " + e);
+// clientBindUrl = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
+// }
+// }
+// else
+// {
+// try
+// {
+// ObjectName connectionON = new ObjectName("jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3");
+// KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
+// clientBindUrl = (String)kernelAbstraction.getAttribute(connectionON, "InvokerLocator");
+// }
+// catch (Exception e)
+// {
+// log.warn("Unable to find default InvokerLocator. Using default. " + e);
+// clientBindUrl = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
+// }
+// }
+// }
+// else if (clientBindUrl.indexOf("0.0.0.0") != -1)
+// {
+// KernelAbstraction kernelAbstraction = KernelAbstractionFactory.getInstance();
+// ObjectName query = new ObjectName("jboss.remoting:type=Connector,handler=ejb3,*");
+// Set mbeanSet = kernelAbstraction.getMBeans(query);
+//
+// URI targetUri = new URI(clientBindUrl);
+// Iterator mbeans = mbeanSet.iterator();
+// while (mbeans.hasNext())
+// {
+// ObjectInstance invokerInstance = (ObjectInstance)mbeans.next();
+// ObjectName invokerName = invokerInstance.getObjectName();
+// String invokerLocator = (String)kernelAbstraction.getAttribute(invokerName, "InvokerLocator");
+// URI uri = new URI(invokerLocator);
+//
+// if (uri.getScheme().equals(targetUri.getScheme()) && uri.getPort() == targetUri.getPort())
+// {
+// return invokerLocator;
+// }
+// }
+// }
+//
+// if (clientBindUrl == null)
+// clientBindUrl = RemoteProxyFactory.DEFAULT_CLIENT_BINDING;
+//
+// return clientBindUrl;
+// }
/**
* Create a Proxy Constructor for the specified interfaces, using the specified CL
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, 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.factory;
-
-/**
- * ProxyFactoryNotRegisteredException
- *
- * Thrown when attempting to retrieve a proxy factory with
- * unrecognized name from the registry
- *
- * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
- * @version $Revision: $
- */
-public class ProxyFactoryNotRegisteredException extends Exception
-{
-
- // Class Members
- private static final long serialVersionUID = -881723607135494483L;
-
- // Constructors
-
- public ProxyFactoryNotRegisteredException()
- {
- super();
- }
-
- public ProxyFactoryNotRegisteredException(String message)
- {
- super(message);
- }
-
-}
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.factory;
-
-import org.jboss.ejb3.proxy.ProxyFactory;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public interface RemoteProxyFactory extends ProxyFactory
-{
- public static final String DEFAULT_CLIENT_BINDING = "socket://0.0.0.0:3873";
-
-// public void setRemoteBinding(RemoteBinding binding);
-}
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -21,85 +21,25 @@
*/
package org.jboss.ejb3.proxy.factory;
-import org.jboss.ejb3.remoting.LoadBalancePolicyNotRegisteredException;
-import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
-import java.util.Map;
-
/**
* Registry for all configured Remote Proxy Factory implementations
*
* @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
* @version $Revision: $
*/
+ at Deprecated
public class RemoteProxyFactoryRegistry
{
- // Instance Members
- private Map<String, Class<? extends RemoteProxyFactory>> factories;
- private Map<String, Class<LoadBalancePolicy>> loadBalancePolicies;
-
- // Accessors / Mutators
-
- public Map<String, Class<? extends RemoteProxyFactory>> getFactories()
- {
- return factories;
- }
-
- public void setFactories(Map<String, Class<? extends RemoteProxyFactory>> factories)
- {
- this.factories = factories;
- }
-
- public Map<String, Class<LoadBalancePolicy>> getLoadBalancePolicies()
- {
- return loadBalancePolicies;
- }
-
- public void setLoadBalancePolicies(Map<String, Class<LoadBalancePolicy>> loadBalancePolicies)
- {
- this.loadBalancePolicies = loadBalancePolicies;
- }
-
- // Functional Methods
-
- /**
- * Obtains the Proxy Factory Class with the specified registered name
+ /*
+ * EJBTHREE-1641
*
- * @param name The registered name of the proxy factory to retrieve
- * @return The Proxy Factory
+ * This is in place as a dummy class until this reference may be removed
+ * safely from AS Ejb3Deployer.
+ *
+ * ejb3-plugin must always be compatible with the last release of AS,
+ * at time of this writing this is AS 5.0.0.GA.
*/
- public Class<? extends RemoteProxyFactory> getProxyFactoryClass(String name) throws ProxyFactoryNotRegisteredException
- {
- // Obtain proxy factory
- Class<? extends RemoteProxyFactory> proxyFactory = this.factories.get(name);
-
- // Ensure registered
- if (proxyFactory == null)
- {
- throw new ProxyFactoryNotRegisteredException("Remoting Proxy Factory with name " + name
- + " is not registered.");
- }
-
- // Return
- return proxyFactory;
-
- }
- public Class<LoadBalancePolicy> getLoadBalancePolicy(String name) throws LoadBalancePolicyNotRegisteredException
- {
- // Obtain Load Balance Policy
- Class<LoadBalancePolicy> loadBalancePolicy = this.loadBalancePolicies.get(name);
-
- // Ensure registered
- if (loadBalancePolicy == null)
- {
- throw new LoadBalancePolicyNotRegisteredException("LoadBalancePolicy with name " + name
- + " is not registered.");
- }
-
- // Return
- return loadBalancePolicy;
-
- }
}
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/SessionProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/SessionProxyFactory.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/factory/SessionProxyFactory.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,49 +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.factory;
-
-import org.jboss.ejb3.proxy.ProxyFactory;
-
-/**
- * SessionProxyFactory
- *
- * Contract for a Proxy Factory specific to
- * operations required by Session implementations
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated In favor of EJB3 Proxy
- */
- at Deprecated
-public interface SessionProxyFactory extends ProxyFactory
-{
- /**
- * Create an EJB3 Business Proxy with the specified
- * target business interface name (should be expressed as
- * a fully-qualified class name)
- *
- * @param id
- * @param businessInterfaceName
- * @return
- */
- public Object createProxyBusiness(String businessInterfaceName);
-}
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,60 +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;
-
-/**
- * BaseProxyInvocationHandler
- *
- * Abstract base upon which all Proxy InvocationHandlers
- * may extend
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- * @deprecated Has moved to EJB3 Proxy Component as ProxyInvocationHandlerBase
- */
- at Deprecated
-public abstract class BaseProxyInvocationHandler implements ProxyInvocationHandlerDeprecated
-{
- // ------------------------------------------------------------------------------||
- // Instance Members -------------------------------------------------------------||
- // ------------------------------------------------------------------------------||
-
- /**
- * Fully-qualified name of the class targeted either for injection
- * or casting to support getInvokedBusinessInterface
- */
- private String businessInterfaceType;
-
- // ------------------------------------------------------------------------------||
- // Accessors / Mutators ---------------------------------------------------------||
- // ------------------------------------------------------------------------------||
-
- public String getBusinessInterfaceType()
- {
- return businessInterfaceType;
- }
-
- protected void setBusinessInterfaceType(String businessInterfaceType)
- {
- this.businessInterfaceType = businessInterfaceType;
- }
-}
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.metadata.SimpleMetaData;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.Ejb3Registry;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public abstract class BaseProxyInvocationHandlerRemote extends BaseProxyInvocationHandler implements java.io.Serializable, InvocationHandler, RemoteProxyInvocationHandler
-{
- private static final long serialVersionUID = 1126421850898582900L;
-
- protected String containerId;
- protected String containerGuid;
- protected Interceptor[] interceptors;
- protected SimpleMetaData metadata;
-
- protected BaseProxyInvocationHandlerRemote(Container container, Interceptor[] interceptors, String businessInterfaceType)
- {
- this.containerId = container.getObjectName().getCanonicalName();
- this.containerGuid = Ejb3Registry.guid(container);
- this.interceptors = interceptors;
- this.setBusinessInterfaceType(businessInterfaceType);
- }
-
- protected BaseProxyInvocationHandlerRemote(String containerId, String containerGuid, Interceptor[] interceptors, String businessInterfaceType)
- {
- this.containerId = containerId;
- this.containerGuid = containerGuid;
- this.interceptors = interceptors;
- this.setBusinessInterfaceType(businessInterfaceType);
- }
-
- protected BaseProxyInvocationHandlerRemote()
- {
- }
-
- public SimpleMetaData getMetaData()
- {
- synchronized (this)
- {
- if (metadata == null) metadata = new SimpleMetaData();
- }
- return metadata;
- }
-
- public abstract Object invoke(Object proxy, Method method, Object[] args)
- throws Throwable;
-
- //Force all remote proxies to override toString()
- public abstract String toString();
-}
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import javax.ejb.EJBMetaData;
-import javax.ejb.Handle;
-import javax.ejb.HomeHandle;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.Container;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version $Revision$
- */
-public abstract class BaseSessionRemoteProxyInvocationHandler extends org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandlerRemote
-{
- private static final long serialVersionUID = 8310915813626447181L;
-
- protected Object id;
-
- protected Handle handle;
- protected HomeHandle homeHandle;
- protected EJBMetaData ejbMetaData;
-
- public BaseSessionRemoteProxyInvocationHandler(Container container, Interceptor[] interceptors, String businessInterfaceType)
- {
- super(container, interceptors, businessInterfaceType);
- }
-
- public BaseSessionRemoteProxyInvocationHandler(String containerId, String containerGuid, Interceptor[] interceptors,
- String businessInterfaceType)
- {
- super(containerId, containerGuid, interceptors, businessInterfaceType);
- }
-
- protected BaseSessionRemoteProxyInvocationHandler()
- {
- }
-
- public Handle getHandle()
- {
- return this.handle;
- }
-
- public void setHandle(Handle handle)
- {
- this.handle = handle;
- }
-
- public void setHomeHandle(HomeHandle homeHandle)
- {
- this.homeHandle = homeHandle;
- }
-
- public void setEjbMetaData(EJBMetaData ejbMetaData)
- {
- this.ejbMetaData = ejbMetaData;
- }
-}
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerDeprecated.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerDeprecated.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandlerDeprecated.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-/**
- * ProxyInvocationHandler
- *
- * Defines
- *
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: 73407 $
- * @deprecated Has moved to EJB3 Proxy Component
- */
- at Deprecated
-public interface ProxyInvocationHandlerDeprecated
-{
- /**
- * For use in hashCode, toString() and equals() *
- */
- String toString();
-
- Object getAsynchronousProxy(Object proxy);
-
- String getBusinessInterfaceType();
-}
\ No newline at end of file
Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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;
-
-import org.jboss.aop.metadata.SimpleMetaData;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public interface RemoteProxyInvocationHandler extends ProxyInvocationHandlerDeprecated
-{
- SimpleMetaData getMetaData();
-}
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -51,26 +51,19 @@
import org.jboss.aop.joinpoint.InvocationResponse;
import org.jboss.aop.joinpoint.MethodInvocation;
import org.jboss.aop.util.MethodHashing;
-import org.jboss.aop.util.PayloadKey;
-import org.jboss.aspects.asynch.FutureHolder;
import org.jboss.beans.metadata.api.annotations.Inject;
import org.jboss.ejb.AllowedOperationsAssociation;
import org.jboss.ejb.AllowedOperationsFlags;
import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.DependencyPolicy;
import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.Ejb3Registry;
import org.jboss.ejb3.annotation.LocalBinding;
import org.jboss.ejb3.annotation.Management;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.annotation.Service;
-import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
import org.jboss.ejb3.common.lang.SerializableMethod;
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
import org.jboss.ejb3.proxy.container.InvokableContext;
-import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.service.ServiceRemoteProxyFactory;
import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
import org.jboss.ejb3.session.SessionContainer;
import org.jboss.ejb3.stateful.StatefulContainerInvocation;
@@ -160,52 +153,6 @@
return new ServiceBeanContext(this, singleton);
}
- @Override
- @Deprecated
- protected org.jboss.ejb3.proxy.factory.SessionProxyFactory getProxyFactory(LocalBinding binding)
- {
- throw new NotImplementedException("@Service container is using old Proxy mechanism");
- }
-
- @Override
- protected SessionProxyFactory getProxyFactory(RemoteBinding binding)
- {
- //TODO Should be obtained from JNDI Registrar, needs to be looked up by a @RemoteBinding key
-
- /*
- * In this implementation we just make a new Proxy Factory, for now
- */
-
- // Create
- SessionProxyFactory factory = new ServiceRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry
- .guid(this), (JBossServiceBeanMetaData) this.getMetaData(), this.getClassloader(), binding.clientBindUrl(),
- this.getAdvisor(), binding.interceptorStack());
-
- // Start the factory
- try
- {
- factory.start();
- }
- catch (Exception e)
- {
- throw new RuntimeException("Error in starting " + factory, e);
- }
-
- // Return
- return factory;
- }
-
- /**
- * @param binding
- * @return
- * @deprecated Until @Service uses EJB3 Proxy
- */
- @Deprecated
- public RemoteProxyFactory getProxyFactoryForService(RemoteBinding binding)
- {
- throw new NotImplementedException(this + " is no longer using unsupported (legacy) proxy impl from ejb3-core");
- }
-
// TODO: integrate with StatelessContainer.initializeTimeout
private void initializeTimeoutMethod()
{
@@ -459,9 +406,9 @@
//Ignore
}
- public Object localInvoke(Object id, Method method, Object[] args, FutureHolder provider) throws Throwable
+ public Object localInvoke(Object id, Method method, Object[] args) throws Throwable
{
- return localInvoke(method, args, provider);
+ return localInvoke(method, args);
}
public Object localHomeInvoke(Method method, Object[] args) throws Throwable
@@ -471,19 +418,11 @@
}
/**
- * Performs a synchronous local invocation
- */
- public Object localInvoke(Method method, Object[] args) throws Throwable
- {
- return localInvoke(method, args, null);
- }
-
- /**
* Performs a synchronous or asynchronous local invocation
*
* @param provider If null a synchronous invocation, otherwise an asynchronous
*/
- public Object localInvoke(Method method, Object[] args, FutureHolder provider) throws Throwable
+ public Object localInvoke(Method method, Object[] args) throws Throwable
{
long start = System.currentTimeMillis();
@@ -505,13 +444,6 @@
nextInvocation = populateInvocation(nextInvocation);
- if (provider != null)
- {
- nextInvocation.getMetaData().addMetaData(AsynchronousInterceptor.ASYNCH,
- AsynchronousInterceptor.INVOKE_ASYNCH, "YES", PayloadKey.AS_IS);
- nextInvocation.getMetaData().addMetaData(AsynchronousInterceptor.ASYNCH,
- AsynchronousInterceptor.FUTURE_HOLDER, provider, PayloadKey.AS_IS);
- }
return nextInvocation.invokeNext();
}
finally
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -24,10 +24,7 @@
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.jboss.ejb3.annotation.LocalBinding;
import org.jboss.ejb3.annotation.RemoteBinding;
@@ -36,10 +33,7 @@
import org.jboss.ejb3.annotation.impl.LocalBindingImpl;
import org.jboss.ejb3.annotation.impl.RemoteBindingImpl;
import org.jboss.ejb3.annotation.impl.RemoteBindingsImpl;
-import org.jboss.ejb3.proxy.ProxyFactory;
import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
-import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
-import org.jboss.ejb3.service.ServiceContainer;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.spec.BusinessRemotesMetaData;
@@ -54,7 +48,6 @@
{
private static final Logger log = Logger.getLogger(ProxyDeployer.class);
private SessionContainer container;
- private Map<Object, ProxyFactory> proxyFactories = new HashMap<Object, ProxyFactory>();
private RemoteBindings remoteBindings;
private LocalBinding localBinding;
@@ -96,51 +89,6 @@
}
}
- public Map<Object, ProxyFactory> getProxyFactories()
- {
- return proxyFactories;
- }
-
- public ProxyFactory getProxyFactory(Object key)
- {
- return this.getProxyFactories().get(key);
- }
-
- public void start() throws Exception
- {
- if (remoteBindings != null)
- {
- RemoteBinding[] list = remoteBindings.value();
- for(RemoteBinding binding : list)
- {
- assert binding.jndiBinding().length() != 0 : "jndiBinding not set on binding " + binding;
-
- RemoteProxyFactory factory;
- String factoryImplementationRegistryKey = binding.factory();
- if (factoryImplementationRegistryKey.equals(RemoteBindingDefaults.PROXY_FACTORY_DEFAULT))
- {
- //TODO Only used in @Service now, this whole class is @Deprecated
- factory = ((ServiceContainer)container).getProxyFactoryForService(binding);
- }
- else
- {
- Class<? extends RemoteProxyFactory> remoteFactoryClass = container.getDeployment().getRemoteProxyFactoryRegistry().getProxyFactoryClass(binding.factory());
- Constructor<? extends RemoteProxyFactory> constructor = getConstructor(remoteFactoryClass, container.getClass(), RemoteBinding.class);
- factory = constructor.newInstance(container, binding);
- }
- factory.start();
- proxyFactories.put(binding,factory);
- }
- }
-
- if (localBinding != null)
- {
- ProxyFactory factory = container.getProxyFactory(localBinding);
- factory.start();
- proxyFactories.put(localBinding,factory);
- }
- }
-
protected boolean hasJNDIBinding(String jndiName)
{
assert jndiName != null : "jndiName is null";
@@ -226,13 +174,4 @@
}
}
- public void stop() throws Exception
- {
- // Stop all proxy factories
- Collection<ProxyFactory> proxyFactories = this.getProxyFactories().values();
- for(ProxyFactory factory : proxyFactories)
- {
- factory.stop();
- }
- }
}
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -48,7 +48,6 @@
import org.jboss.aop.joinpoint.InvocationResponse;
import org.jboss.aop.proxy.ClassProxy;
import org.jboss.aop.util.MethodHashing;
-import org.jboss.aspects.asynch.FutureHolder;
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.ejb3.Ejb3Module;
@@ -59,12 +58,11 @@
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.proxy.ProxyUtils;
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
import org.jboss.ejb3.proxy.container.InvokableContext;
import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
-import org.jboss.ejb3.proxy.factory.SessionProxyFactory;
+import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.ejb3.stateful.StatefulContainerInvocation;
@@ -120,19 +118,43 @@
proxyDeployer = new ProxyDeployer(this);
}
- /**
- * Create a local proxy factory.
- * @return
- */
- protected abstract SessionProxyFactory getProxyFactory(LocalBinding binding);
+ protected SessionProxyFactory getProxyFactory(LocalBinding binding)
+ {
+ assert binding!=null : LocalBinding.class.getSimpleName() + " must be specified";
+
+ // Get the Registry name
+ String proxyFactoryRegistryBindName = this.getJndiRegistrar().getProxyFactoryRegistryKey(binding.jndiBinding(), this.getMetaData(), true);
+
+ // Return
+ return this.getProxyFactory(proxyFactoryRegistryBindName);
+ }
+ protected SessionProxyFactory getProxyFactory(RemoteBinding binding)
+ {
+ assert binding!=null : RemoteBinding.class.getSimpleName() + " must be specified";
+
+ // Get the Registry name
+ String proxyFactoryRegistryBindName = this.getJndiRegistrar().getProxyFactoryRegistryKey(binding.jndiBinding(), this.getMetaData(), true);
+
+ // Return
+ return this.getProxyFactory(proxyFactoryRegistryBindName);
+ }
+
/**
- * Create a remote proxy factory on the given binding.
+ * Obtains the proxy factory bound at the specified registry name
*
- * @param binding
+ * @param proxyFactoryRegistryBindName
* @return
*/
- protected abstract org.jboss.ejb3.proxy.factory.session.SessionProxyFactory getProxyFactory(RemoteBinding binding);
+ protected SessionProxyFactory getProxyFactory(String proxyFactoryRegistryBindName)
+ {
+ // Lookup
+ SessionProxyFactory factory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryRegistryBindName,
+ SessionProxyFactory.class);
+
+ // Return
+ return factory;
+ }
/**
* Entry point for remoting-based invocations via InvokableContextClassProxyHack
@@ -584,7 +606,7 @@
* @deprecated Use "invoke" as defined by InvokableContext
*/
@Deprecated
- public Object invoke(SessionProxyFactory factory, Object id, Method method, Object args[], FutureHolder provider) throws Throwable
+ public Object invoke(SessionProxyFactory factory, Object id, Method method, Object args[]) throws Throwable
{
ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
pushEnc();
@@ -621,7 +643,6 @@
// allow a container to supplement information into an invocation
nextInvocation = populateInvocation(nextInvocation);
- ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
return nextInvocation.invokeNext();
}
finally
@@ -640,7 +661,7 @@
*/
abstract public Serializable createSession(Class<?> initParameterTypes[], Object initParameterValues[]);
- abstract public Object localInvoke(Object id, Method method, Object[] args, FutureHolder provider) throws Throwable;
+ abstract public Object localInvoke(Object id, Method method, Object[] args) throws Throwable;
abstract public Object localHomeInvoke(Method method, Object[] args) throws Throwable;
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -11,10 +11,8 @@
import javax.ejb.RemoveException;
import javax.ejb.SessionContext;
-import org.jboss.aop.Dispatcher;
import org.jboss.aop.Domain;
import org.jboss.aop.MethodInfo;
-import org.jboss.aop.proxy.ClassProxy;
import org.jboss.aop.util.MethodHashing;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.ejb3.ThreadLocalStack;
@@ -71,53 +69,53 @@
super(cl, beanClassName, ejbName, domain, ctxProperties, deployment, beanMetaData);
}
- /**
- * Create a remote proxy (EJBObject) for an enterprise bean identified by id
- *
- * @param id
- * @return
- * @throws Exception
- */
- public Object createProxyRemoteEjb21(String businessInterfaceType) throws Exception
- {
- RemoteBinding binding = this.getRemoteBinding();
- return this.createProxyRemoteEjb21(binding, businessInterfaceType);
- }
+// /**
+// * Create a remote proxy (EJBObject) for an enterprise bean identified by id
+// *
+// * @param id
+// * @return
+// * @throws Exception
+// */
+// public Object createProxyRemoteEjb21() throws Exception
+// {
+// RemoteBinding binding = this.getRemoteBinding();
+// return this.createProxyRemoteEjb21(binding);
+// }
+//
+// /**
+// * Create a remote proxy (EJBObject) for an enterprise bean identified by id on a given binding
+// *
+// * @param id
+// * @param binding
+// * @return
+// * @throws Exception
+// */
+// public abstract Object createProxyRemoteEjb21(RemoteBinding binding) throws Exception;
+//
+// /**
+// * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id
+// *
+// * @param id
+// * @return
+// * @throws Exception
+// */
+// public Object createProxyLocalEjb21() throws Exception
+// {
+// LocalBinding binding = this.getAnnotation(LocalBinding.class);
+// return this.createProxyLocalEjb21(binding);
+// }
+//
+// /**
+// * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id, with
+// * the specified LocalBinding
+// *
+// * @param id
+// * @return
+// * @throws Exception
+// */
+// public abstract Object createProxyLocalEjb21(LocalBinding binding) throws Exception;
/**
- * Create a remote proxy (EJBObject) for an enterprise bean identified by id on a given binding
- *
- * @param id
- * @param binding
- * @return
- * @throws Exception
- */
- public abstract Object createProxyRemoteEjb21(RemoteBinding binding, String businessInterfaceType) throws Exception;
-
- /**
- * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id
- *
- * @param id
- * @return
- * @throws Exception
- */
- public Object createProxyLocalEjb21(String businessInterfaceType) throws Exception
- {
- LocalBinding binding = this.getAnnotation(LocalBinding.class);
- return this.createProxyLocalEjb21(binding, businessInterfaceType);
- }
-
- /**
- * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id, with
- * the specified LocalBinding
- *
- * @param id
- * @return
- * @throws Exception
- */
- public abstract Object createProxyLocalEjb21(LocalBinding binding, String businessInterfaceType) throws Exception;
-
- /**
* Invokes the method described by the specified serializable method
* as called from the specified proxy, using the specified arguments
*
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -50,10 +50,8 @@
import org.jboss.aop.joinpoint.InvocationResponse;
import org.jboss.aop.util.MethodHashing;
import org.jboss.aop.util.PayloadKey;
-import org.jboss.aspects.asynch.FutureHolder;
import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.Ejb3Registry;
import org.jboss.ejb3.annotation.Cache;
import org.jboss.ejb3.annotation.CacheConfig;
import org.jboss.ejb3.annotation.Clustered;
@@ -65,19 +63,12 @@
import org.jboss.ejb3.cache.StatefulCache;
import org.jboss.ejb3.cache.StatefulObjectFactory;
import org.jboss.ejb3.common.lang.SerializableMethod;
-import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
import org.jboss.ejb3.interceptors.container.StatefulSessionContainerMethodInvocation;
-import org.jboss.ejb3.proxy.ProxyUtils;
-import org.jboss.ejb3.proxy.clustered.factory.session.stateful.StatefulSessionClusteredProxyFactory;
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
-import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
import org.jboss.ejb3.proxy.container.StatefulSessionInvokableContext;
import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionRemoteProxyFactory;
-import org.jboss.ejb3.proxy.factory.stateful.StatefulLocalProxyFactory;
-import org.jboss.ejb3.proxy.factory.stateful.StatefulRemoteProxyFactory;
import org.jboss.ejb3.proxy.impl.EJBMetaDataImpl;
import org.jboss.ejb3.proxy.impl.HomeHandleImpl;
import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
@@ -92,6 +83,7 @@
import org.jboss.injection.JndiPropertyInjector;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.util.NotImplementedException;
/**
@@ -158,110 +150,30 @@
return new StatefulBeanContext(this, construct());
}
- @Override
- protected StatefulLocalProxyFactory getProxyFactory(LocalBinding binding)
+ public Object createProxyLocalEjb21(Object id, LocalBinding binding) throws Exception
{
- StatefulLocalProxyFactory factory = (StatefulLocalProxyFactory) this.proxyDeployer.getProxyFactory(binding);
-
- if (factory == null)
- {
- factory = new StatefulLocalProxyFactory(this, binding);
-
- try
- {
- factory.init();
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- return factory;
+ StatefulSessionProxyFactory proxyFactory = (StatefulSessionProxyFactory)this.getProxyFactory(binding);
+ return proxyFactory.createProxyEjb2x((Serializable)id);
}
- public Object createProxyLocalEjb21(Object id, LocalBinding binding, String businessInterfaceType) throws Exception
+ public Object createProxyRemoteEjb21(Object id) throws Exception
{
- StatefulLocalProxyFactory proxyFactory = this.getProxyFactory(binding);
- return proxyFactory.createProxyEjb21(id,businessInterfaceType);
- }
-
- public Object createProxyRemoteEjb21(Object id, String businessInterfaceType) throws Exception
- {
RemoteBinding binding = this.getRemoteBinding();
- return this.createProxyRemoteEjb21(id,binding, businessInterfaceType);
+ return this.createProxyRemoteEjb21(id,binding);
}
- public Object createProxyRemoteEjb21(Object id, RemoteBinding binding, String businessInterfaceType) throws Exception
+ public Object createProxyRemoteEjb21(Object id, RemoteBinding binding) throws Exception
{
- StatefulSessionProxyFactory proxyFactory = this.getProxyFactory(binding);
+ StatefulSessionProxyFactory proxyFactory = (StatefulSessionProxyFactory)this.getProxyFactory(binding);
return proxyFactory.createProxyEjb2x((Serializable)id);
}
- public Object createProxyLocalEjb21(Object id, String businessInterfaceType) throws Exception
+ public Object createProxyLocalEjb21(Object id) throws Exception
{
LocalBinding binding = this.getAnnotation(LocalBinding.class);
- return this.createProxyLocalEjb21(id,binding, businessInterfaceType);
+ return this.createProxyLocalEjb21(id,binding);
}
- @Override
- public Object createProxyLocalEjb21(LocalBinding binding, String businessInterfaceType) throws Exception
- {
- Object id = this.createSession();
- return this.createProxyLocalEjb21(id,binding, businessInterfaceType);
- }
-
- @Override
- public Object createProxyRemoteEjb21(RemoteBinding binding, String businessInterfaceType) throws Exception
- {
- Object id = this.createSession();
- return this.createProxyRemoteEjb21(id, binding, businessInterfaceType);
- }
-
- @Override
- protected StatefulSessionProxyFactory getProxyFactory(RemoteBinding binding)
- {
- //TODO Should be obtained from JNDI Registrar, needs to be looked up by a @RemoteBinding key
-
- /*
- * In this implementation we just make a new Proxy Factory, for now
- */
-
- // Initialize
- StatefulSessionProxyFactory factory = null;
-
- // If Clustered
- if (this.isAnnotationPresent(Clustered.class))
- {
- // Get the Proxy Clustering Registry
- Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
- String mcName = ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_PROXY_CLUSTERING_REGISTRY;
- ProxyClusteringRegistry registry = (ProxyClusteringRegistry) registrar.lookup(mcName);
- assert registry != null : "Could not find " + ProxyClusteringRegistry.class.getSimpleName() + " in the "
- + Ejb3Registrar.class.getSimpleName() + " under name " + mcName;
- factory = new StatefulSessionClusteredProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this),
- this.getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), registry, null);
- }
- else
- {
- factory = new StatefulSessionRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this), this
- .getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), null);
- }
-
- // Start the Factory
- try
- {
- factory.start();
- }
- catch (Exception e)
- {
- throw new RuntimeException("Could not start " + factory, e);
- }
-
- // Return
- return factory;
- }
-
public void destroy(StatefulBeanContext ctx)
{
try
@@ -364,15 +276,6 @@
}
/**
- * Performs a synchronous local invocation
- */
- public Object localInvoke(Object id, Method method, Object[] args)
- throws Throwable
- {
- return localInvoke(id, method, args, null);
- }
-
- /**
* Performs a synchronous or asynchronous local invocation
*
*/
@@ -404,8 +307,7 @@
*
* @param provider If null a synchronous invocation, otherwise an asynchronous
*/
- public Object localInvoke(Object id, Method method, Object[] args,
- FutureHolder provider) throws Throwable
+ public Object localInvoke(Object id, Method method, Object[] args) throws Throwable
{
long start = System.currentTimeMillis();
@@ -446,8 +348,6 @@
nextInvocation.setAdvisor(getAdvisor());
nextInvocation.setArguments(args);
- ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
-
//invokedMethod.push(invoked);
return nextInvocation.invokeNext();
}
@@ -957,39 +857,40 @@
private Object invokeLocalHomeMethod(MethodInfo info, Object[] args)
throws Exception
{
- Method unadvisedMethod = info.getUnadvisedMethod();
- if (unadvisedMethod.getName().startsWith("create"))
- {
- Class<?>[] initParameterTypes =
- {};
- Object[] initParameterValues =
- {};
- if (unadvisedMethod.getParameterTypes().length > 0)
- {
- initParameterTypes = unadvisedMethod.getParameterTypes();
- initParameterValues = args;
- }
-
- LocalBinding binding = this.getAnnotation(LocalBinding.class);
-
- StatefulLocalProxyFactory factory = new StatefulLocalProxyFactory(this, binding);
- factory.init();
-
- Object proxy = factory.createProxyEjb21(initParameterTypes,
- initParameterValues, unadvisedMethod.getReturnType().getName());
-
- return proxy;
- }
- else if (unadvisedMethod.getName().equals("remove"))
- {
- remove(args[0]);
-
- return null;
- }
- else
- {
- return null;
- }
+ throw new NotImplementedException("EJBTHREE-1641");
+// Method unadvisedMethod = info.getUnadvisedMethod();
+// if (unadvisedMethod.getName().startsWith("create"))
+// {
+// Class<?>[] initParameterTypes =
+// {};
+// Object[] initParameterValues =
+// {};
+// if (unadvisedMethod.getParameterTypes().length > 0)
+// {
+// initParameterTypes = unadvisedMethod.getParameterTypes();
+// initParameterValues = args;
+// }
+//
+// LocalBinding binding = this.getAnnotation(LocalBinding.class);
+//
+// StatefulLocalProxyFactory factory = new StatefulLocalProxyFactory(this, binding);
+// factory.init();
+//
+// Object proxy = factory.createProxyEjb21(initParameterTypes,
+// initParameterValues, unadvisedMethod.getReturnType().getName());
+//
+// return proxy;
+// }
+// else if (unadvisedMethod.getName().equals("remove"))
+// {
+// remove(args[0]);
+//
+// return null;
+// }
+// else
+// {
+// return null;
+// }
}
public Object createLocalProxy(Object id) throws Exception
@@ -999,21 +900,23 @@
public Object createLocalProxy(Object id, LocalBinding binding) throws Exception
{
- StatefulLocalProxyFactory factory = new StatefulLocalProxyFactory(this, binding);
- factory.init();
-
- return factory.createProxyBusiness(id);
+ throw new NotImplementedException("EJBTHREE-1641");
+// StatefulLocalProxyFactory factory = new StatefulLocalProxyFactory(this, binding);
+// factory.init();
+//
+// return factory.createProxyBusiness(id);
}
public Object createRemoteProxy(Object id, RemoteBinding binding) throws Exception
{
- StatefulRemoteProxyFactory factory = new StatefulRemoteProxyFactory(this, binding);
- factory.init();
-
- if (id != null)
- return factory.createProxyBusiness(id,null);
- else
- return factory.createProxyBusiness();
+ throw new NotImplementedException("EJBTHREE-1641");
+// StatefulRemoteProxyFactory factory = new StatefulRemoteProxyFactory(this, binding);
+// factory.init();
+//
+// if (id != null)
+// return factory.createProxyBusiness(id,null);
+// else
+// return factory.createProxyBusiness();
}
public boolean isClustered()
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -45,7 +45,6 @@
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.InvocationResponse;
import org.jboss.aop.joinpoint.MethodInvocation;
-import org.jboss.aspects.asynch.FutureHolder;
import org.jboss.beans.metadata.api.annotations.Inject;
import org.jboss.ejb.AllowedOperationsAssociation;
import org.jboss.ejb.AllowedOperationsFlags;
@@ -53,25 +52,17 @@
import org.jboss.ejb3.BeanContextLifecycleCallback;
import org.jboss.ejb3.EJBContainerInvocation;
import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.Ejb3Registry;
import org.jboss.ejb3.annotation.Clustered;
import org.jboss.ejb3.annotation.LocalBinding;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.annotation.RemoteHomeBinding;
import org.jboss.ejb3.common.lang.SerializableMethod;
-import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.proxy.ProxyUtils;
-import org.jboss.ejb3.proxy.clustered.factory.session.stateless.StatelessSessionClusteredProxyFactory;
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
-import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
import org.jboss.ejb3.proxy.container.InvokableContext;
import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
import org.jboss.ejb3.proxy.factory.session.SessionSpecProxyFactory;
import org.jboss.ejb3.proxy.factory.session.stateless.StatelessSessionProxyFactoryBase;
-import org.jboss.ejb3.proxy.factory.session.stateless.StatelessSessionRemoteProxyFactory;
-import org.jboss.ejb3.proxy.factory.stateless.StatelessLocalProxyFactory;
import org.jboss.ejb3.proxy.impl.EJBMetaDataImpl;
import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
@@ -87,6 +78,7 @@
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
import org.jboss.metadata.ejb.spec.NamedMethodMetaData;
import org.jboss.proxy.ejb.handle.HomeHandleImpl;
+import org.jboss.util.NotImplementedException;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
@@ -127,89 +119,33 @@
return new StatelessBeanContext(this, construct());
}
- @Override
- protected StatelessLocalProxyFactory getProxyFactory(LocalBinding binding)
+ public Object createProxyLocalEjb21() throws Exception
{
- StatelessLocalProxyFactory factory = (StatelessLocalProxyFactory) this.proxyDeployer.getProxyFactory(binding);
-
- if (factory == null)
- {
- factory = new StatelessLocalProxyFactory(this, binding);
- try
- {
- factory.init();
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- return factory;
+ return this.createProxyLocalEjb21(this.getAnnotation(LocalBinding.class));
}
- @Override
- protected SessionProxyFactory getProxyFactory(RemoteBinding binding)
- {
- //TODO Should be obtained from JNDI Registrar, needs to be looked up by a @RemoteBinding key
-
- /*
- * In this implementation we just make a new Proxy Factory, for now
- */
-
- // Initialize
- SessionProxyFactory factory = null;
-
- // If Clustered
- if (this.isAnnotationPresent(Clustered.class))
- {
- // Get the Proxy Clustering Registry
- Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
- String mcName = ClusteredObjectStoreBindings.CLUSTERED_OBJECTSTORE_BEAN_NAME_PROXY_CLUSTERING_REGISTRY;
- ProxyClusteringRegistry registry = (ProxyClusteringRegistry) registrar.lookup(mcName);
- assert registry != null : "Could not find " + ProxyClusteringRegistry.class.getSimpleName() + " in the "
- + Ejb3Registrar.class.getSimpleName() + " under name " + mcName;
- factory = new StatelessSessionClusteredProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this),
- this.getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), registry, null);
- }
- else
- {
- factory = new StatelessSessionRemoteProxyFactory(this.getName(), this.getName(), Ejb3Registry.guid(this), this
- .getMetaData(), this.getClassloader(), binding.clientBindUrl(), this.getAdvisor(), null);
- }
-
- // Start the factory
- try
- {
- factory.start();
- }
- catch (Exception e)
- {
- throw new RuntimeException("Error in starting " + factory, e);
- }
-
- // Return
- return factory;
- }
-
/**
- * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id, with
+ * Create a local proxy (EJBLocalObject) for an enterprise bean with
* the specified LocalBinding
*
* @param id
* @return
* @throws Exception
*/
- @Override
- public Object createProxyLocalEjb21(LocalBinding binding, String businessInterfaceType) throws Exception
+ public Object createProxyLocalEjb21(LocalBinding binding) throws Exception
{
- StatelessLocalProxyFactory proxyFactory = this.getProxyFactory(binding);
- return proxyFactory.createProxyEjb21(businessInterfaceType);
+
+ SessionSpecProxyFactory proxyFactory = (SessionSpecProxyFactory) this.getProxyFactory(binding);
+ return proxyFactory.createProxyEjb2x();
}
- @Override
- public Object createProxyRemoteEjb21(RemoteBinding binding, String businessInterfaceType) throws Exception
+ public Object createProxyRemoteEjb21() throws Exception
{
+ return this.createProxyRemoteEjb21(this.getRemoteBinding());
+ }
+
+ public Object createProxyRemoteEjb21(RemoteBinding binding) throws Exception
+ {
SessionSpecProxyFactory proxyFactory = (SessionSpecProxyFactory) this.getProxyFactory(binding);
return proxyFactory.createProxyEjb2x();
}
@@ -330,23 +266,13 @@
return localInvoke(method, args, null);
}
- /**
- * Performs a synchronous or asynchronous local invocation
- *
- * @param provider If null a synchronous invocation, otherwise an asynchronous
- */
- public Object localInvoke(Method method, Object[] args, FutureHolder provider) throws Throwable
+ public Object localInvoke(Object id, Method method, Object[] args) throws Throwable
{
- return localInvoke(method, args, provider, null);
+ return localInvoke(method, args);
}
- public Object localInvoke(Object id, Method method, Object[] args, FutureHolder provider) throws Throwable
+ public Object localInvoke(Method method, Object[] args, BeanContextLifecycleCallback<StatelessBeanContext> callback) throws Throwable
{
- return localInvoke(method, args, provider);
- }
-
- public Object localInvoke(Method method, Object[] args, FutureHolder provider, BeanContextLifecycleCallback<StatelessBeanContext> callback) throws Throwable
- {
long start = System.currentTimeMillis();
ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
@@ -371,7 +297,6 @@
nextInvocation.setArguments(args);
nextInvocation.setContextCallback(callback);
- ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
return nextInvocation.invokeNext();
}
finally
@@ -585,23 +510,24 @@
public Object localHomeInvoke(Method method, Object[] args) throws Throwable
{
- if (method.getName().equals("create"))
- {
- LocalBinding binding = this.getAnnotation(LocalBinding.class);
-
- // FIXME: why this binding? Could be another one. (there is only one local binding, but that's another bug)
-
- StatelessLocalProxyFactory factory = this.getProxyFactory(binding);
-
- Object proxy = factory.createProxyEjb21(method.getReturnType().getName());
-
- return proxy;
- }
- else
- // remove
- {
- return null;
- }
+ throw new NotImplementedException("EJBTHREE-1641");
+// if (method.getName().equals("create"))
+// {
+// LocalBinding binding = this.getAnnotation(LocalBinding.class);
+//
+// // FIXME: why this binding? Could be another one. (there is only one local binding, but that's another bug)
+//
+// StatelessLocalProxyFactory factory = this.getProxyFactory(binding);
+//
+// Object proxy = factory.createProxyEjb21(method.getReturnType().getName());
+//
+// return proxy;
+// }
+// else
+// // remove
+// {
+// return null;
+// }
}
protected Object invokeHomeMethod(MethodInfo info, MethodInvocation invocation) throws Throwable
@@ -727,7 +653,7 @@
WSCallbackImpl ejb3Callback = new WSCallbackImpl( jaxrpcContext, jaxwsContext );
// Actual invocation
- return this.localInvoke(method, args, null, ejb3Callback);
+ return this.localInvoke(method, args, ejb3Callback);
}
public String getContainerName()
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -51,7 +51,7 @@
{
try
{
- EJBLocalObject proxy = (EJBLocalObject) container.createProxyLocalEjb21(null);
+ EJBLocalObject proxy = (EJBLocalObject) (StatelessContainer) container.createProxyLocalEjb21();
return proxy;
}
catch (Exception e)
@@ -65,7 +65,7 @@
{
try
{
- EJBObject proxy = (EJBObject) container.createProxyRemoteEjb21(null);
+ EJBObject proxy = (EJBObject) container.createProxyRemoteEjb21();
return proxy;
}
catch (Exception e)
Modified: projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml 2009-02-06 10:45:40 UTC (rev 83940)
@@ -44,7 +44,6 @@
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="cacheFactoryRegistry"><inject bean="EJB3CacheFactoryRegistry" /></property>
<property name="poolFactoryRegistry"><inject bean="EJB3PoolFactoryRegistry" /></property>
- <property name="remoteProxyFactoryRegistry"><inject bean="EJB3RemoteProxyFactoryRegistry" /></property>
<property name="persistenceManagerFactoryRegistry"><inject bean="EJB3PersistenceManagerFactoryRegistry" /></property>
<!-- Should war deployments be scanned for annotated ejbs -->
<property name="scanWars">false</property>
@@ -224,51 +223,6 @@
</property>
</bean>
- <!-- Remoting Proxy Factory Registry -->
- <bean name="EJB3RemoteProxyFactoryRegistry" class="org.jboss.ejb3.proxy.factory.RemoteProxyFactoryRegistry">
- <property name="factories">
- <!-- Define each of the registered factories -->
- <map class="java.util.HashMap" keyClass="java.lang.String"
- valueClass="java.lang.Class">
- <!-- RemoteProxyFactory -->
- <entry>
- <key>RemoteProxyFactory</key>
- <value>org.jboss.ejb3.proxy.factory.RemoteProxyFactory</value>
- </entry>
- <!-- IORFactory -->
- <entry>
- <key>IORFactory</key>
- <value>org.jboss.ejb3.iiop.IORFactory</value>
- </entry>
- <!-- ServiceRemoteProxyFactory -->
- <entry>
- <key>ServiceRemoteProxyFactory</key>
- <value>org.jboss.ejb3.proxy.factory.session.service.ServiceRemoteProxyFactory</value>
- </entry>
- <!-- StatefulClusterProxyFactory -->
- <entry>
- <key>StatefulClusterProxyFactory</key>
- <value>org.jboss.ejb3.proxy.factory.stateful.StatefulClusterProxyFactory</value>
- </entry>
- <!-- StatefulRemoteProxyFactory -->
- <entry>
- <key>StatefulRemoteProxyFactory</key>
- <value>org.jboss.ejb3.proxy.factory.stateful.StatefulRemoteProxyFactory</value>
- </entry>
- <!-- StatelessClusterProxyFactory -->
- <entry>
- <key>StatelessClusterProxyFactory</key>
- <value>org.jboss.ejb3.proxy.factory.stateless.StatelessClusterProxyFactory</value>
- </entry>
- <!-- StatelessRemoteProxyFactory -->
- <entry>
- <key>StatelessRemoteProxyFactory</key>
- <value>org.jboss.ejb3.proxy.factory.stateless.StatelessRemoteProxyFactory</value>
- </entry>
- </map>
- </property>
- </bean>
-
<!-- EJB3 Persistence Manager Factory Registry -->
<bean name="EJB3PersistenceManagerFactoryRegistry" class="org.jboss.ejb3.cache.persistence.PersistenceManagerFactoryRegistry">
<property name="factories">
Modified: projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml
===================================================================
--- projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml 2009-02-06 10:45:40 UTC (rev 83940)
@@ -17,20 +17,6 @@
<interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
</stack>
- <stack name="AsynchronousStatelessSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.security.client.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
- <stack name="AsynchronousStatefulSessionClientInterceptors">
- <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.security.client.SecurityClientInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
- <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
- </stack>
-
<stack name="StatelessSessionClientInterceptors">
<interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.security.client.SecurityClientInterceptor"/>
@@ -62,7 +48,6 @@
</stack>
<interceptor class="org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor" scope="PER_VM"/>
- <interceptor class="org.jboss.ejb3.asynchronous.AsynchronousInterceptor" scope="PER_CLASS"/>
<interceptor class="org.jboss.ejb3.ENCPropagationInterceptor" scope="PER_VM"/>
<interceptor name="Basic Authorization" factory="org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorFactory" scope="PER_CLASS"/>
<interceptor name="JACC Authorization" factory="org.jboss.ejb3.security.JaccAuthorizationInterceptorFactory" scope="PER_CLASS"/>
@@ -157,7 +142,6 @@
<domain name="Stateless Bean" extends="Intercepted Bean" inheritBindings="true">
<bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
</bind>
@@ -187,7 +171,6 @@
<domain name="JACC Stateless Bean" extends="Intercepted Bean" inheritBindings="true">
<bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
</bind>
@@ -217,7 +200,6 @@
<domain name="Base Stateful Bean" extends="Intercepted Bean" inheritBindings="true">
<bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
</bind>
@@ -287,7 +269,6 @@
<domain name="JACC Stateful Bean" extends="Intercepted Bean" inheritBindings="true">
<bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
</bind>
@@ -402,7 +383,6 @@
<domain name="Service Bean" extends="Intercepted Bean" inheritBindings="true">
<bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
</bind>
<bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..)) AND !execution(* *->stop()) AND !execution(* *->destroy())">
@@ -429,7 +409,6 @@
<domain name="JACC Service Bean" extends="Intercepted Bean" inheritBindings="true">
<bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
</bind>
<bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..)) AND !execution(* *->stop()) AND !execution(* *->destroy())">
Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/regression/ejbthree1253/unit/OverriddenProxyFactoryTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/regression/ejbthree1253/unit/OverriddenProxyFactoryTestCase.java 2009-02-06 10:31:15 UTC (rev 83939)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/core/test/regression/ejbthree1253/unit/OverriddenProxyFactoryTestCase.java 2009-02-06 10:45:40 UTC (rev 83940)
@@ -36,7 +36,6 @@
import org.jboss.ejb3.core.test.common.MockEjb3Deployment;
import org.jboss.ejb3.core.test.regression.ejbthree1253.MyStateful;
import org.jboss.ejb3.core.test.regression.ejbthree1253.MyStatefulBean;
-import org.jboss.ejb3.proxy.factory.RemoteProxyFactoryRegistry;
import org.jboss.ejb3.stateful.StatefulContainer;
import org.jboss.ejb3.test.cachepassivation.MockDeploymentUnit;
import org.jboss.ejb3.test.common.MetaDataHelper;
@@ -62,7 +61,6 @@
Hashtable<?,?> ctxProperties = null;
Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
deployment.setPersistenceManagerFactoryRegistry(getBootstrap().lookup("EJB3PersistenceManagerFactoryRegistry", PersistenceManagerFactoryRegistry.class));
- deployment.setRemoteProxyFactoryRegistry(getBootstrap().lookup("EJB3RemoteProxyFactoryRegistry", RemoteProxyFactoryRegistry.class));
JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(MyStatefulBean.class);
StatefulContainer container = new StatefulContainer(cl, beanClassname, ejbName, domain, ctxProperties, deployment, beanMetaData);
More information about the jboss-cvs-commits
mailing list