[jboss-cvs] JBossAS SVN: r72523 - in projects/ejb3/dev/ejbthree1269/core: .settings and 17 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Apr 21 17:13:12 EDT 2008
Author: ALRubinger
Date: 2008-04-21 17:13:11 -0400 (Mon, 21 Apr 2008)
New Revision: 72523
Added:
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java
Removed:
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyUtils.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/BaseProxyInvocationHandlerRemote.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyInvocationHandler.java
Modified:
projects/ejb3/dev/ejbthree1269/core/.project
projects/ejb3/dev/ejbthree1269/core/.settings/org.eclipse.jdt.core.prefs
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/EJBContainer.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3DescriptorHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/enc/DeploymentEjbResolver.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MDB.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MessagingContainer.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceLocalProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceRemoteProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceLocalProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceRemoteProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulClusteredInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulHomeRemoteProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulLocalProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulRemoteProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessClusteredInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessLocalProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessRemoteProxyInvocationHandler.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
Log:
[EJBTHREE-1269] Moving of source locations into "proxy" namespace
Modified: projects/ejb3/dev/ejbthree1269/core/.project
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/.project 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/.project 2008-04-21 21:13:11 UTC (rev 72523)
@@ -4,14 +4,10 @@
<projects/>
<buildSpec>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
\ No newline at end of file
Modified: projects/ejb3/dev/ejbthree1269/core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/.settings/org.eclipse.jdt.core.prefs 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/.settings/org.eclipse.jdt.core.prefs 2008-04-21 21:13:11 UTC (rev 72523)
@@ -1,4 +1,4 @@
-#Fri Apr 18 19:35:28 CEST 2008
+#Mon Apr 21 11:01:00 GMT-05:00 2008
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.5
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/EJBContainer.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/EJBContainer.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/EJBContainer.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -80,6 +80,7 @@
import org.jboss.ejb3.pool.Pool;
import org.jboss.ejb3.pool.PoolFactory;
import org.jboss.ejb3.pool.PoolFactoryRegistry;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.security.SecurityDomainManager;
import org.jboss.ejb3.statistics.InvocationStatistics;
import org.jboss.ejb3.tx.UserTransactionImpl;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3Deployment.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -59,7 +59,8 @@
import org.jboss.ejb3.metadata.jpa.spec.PersistenceUnitMetaData;
import org.jboss.ejb3.metadata.jpa.spec.PersistenceUnitsMetaData;
import org.jboss.ejb3.pool.PoolFactoryRegistry;
-import org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactoryRegistry;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossGenericBeanMetaData;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3DescriptorHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/Ejb3DescriptorHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -135,6 +135,7 @@
import org.jboss.ejb3.lang.ClassHelper;
import org.jboss.ejb3.mdb.ConsumerContainer;
import org.jboss.ejb3.mdb.MDB;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.service.ServiceContainer;
import org.jboss.ejb3.stateful.StatefulContainer;
import org.jboss.logging.Logger;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/LocalProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -28,7 +28,7 @@
import java.lang.reflect.InvocationHandler;
import org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandler;
-import org.jboss.ejb3.remoting.ProxyInvocationHandler;
+import org.jboss.ejb3.proxy.handler.ProxyInvocationHandler;
import org.jboss.logging.Logger;
/**
Deleted: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -1,1053 +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.lang.reflect.Constructor;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.ejb.EJBHome;
-import javax.ejb.EJBLocalHome;
-import javax.ejb.EJBLocalObject;
-import javax.ejb.EJBObject;
-import javax.ejb.Local;
-import javax.ejb.LocalHome;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.jws.WebService;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-import org.jboss.ejb3.annotation.JndiBindingPolicy;
-import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.ejb3.annotation.LocalHomeBinding;
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.annotation.RemoteBindings;
-import org.jboss.ejb3.annotation.RemoteHomeBinding;
-import org.jboss.ejb3.annotation.impl.LocalImpl;
-import org.jboss.ejb3.annotation.impl.RemoteImpl;
-import org.jboss.ejb3.jndipolicy.DefaultJndiBindingPolicy;
-import org.jboss.ejb3.jndipolicy.Ejb3DeploymentSummary;
-import org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy;
-import org.jboss.ejb3.lang.ClassHelper;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
-import org.jboss.ejb3.service.ServiceContainer;
-import org.jboss.ejb3.session.SessionContainer;
-import org.jboss.ejb3.stateful.StatefulContainer;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class ProxyFactoryHelper
-{
- private static final Logger log = Logger.getLogger(ProxyFactoryHelper.class);
-
- private static String getEndpointInterface(Container container)
- {
- WebService ws = (javax.jws.WebService) ((EJBContainer) container).resolveAnnotation(javax.jws.WebService.class);
- if (ws != null)
- {
- return ws.endpointInterface();
- }
- return null;
- }
-
- /**
- *
- * @param container
- * @return the local interfaces of the container or an empty array
- */
- public static Class<?>[] getLocalAndBusinessLocalInterfaces(Container container)
- {
- // Initialize
- Set<Class<?>> localAndBusinessLocalInterfaces = new HashSet<Class<?>>();
-
- // Obtain Bean Class
- Class<?> beanClass = container.getBeanClass();
-
- // Obtain @Local
- Local localAnnotation = ((EJBContainer) container).getAnnotation(Local.class);
-
- // Obtain @LocalHome
- LocalHome localHomeAnnotation = ((EJBContainer) container).getAnnotation(LocalHome.class);
-
- // Obtain @Remote
- Remote remoteAnnotation = ((EJBContainer) container).getAnnotation(Remote.class);
-
- // Obtain Remote and Business Remote interfaces
- Class<?>[] remoteAndBusinessRemoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container);
-
- // Obtain all business interfaces from the bean class
- Set<Class<?>> businessInterfacesImplementedByBeanClass = ProxyFactoryHelper.getBusinessInterfaces(beanClass);
-
- // Obtain all business interfaces directly implemented by the bean class (not including supers)
- Set<Class<?>> businessInterfacesDirectlyImplementedByBeanClass = ProxyFactoryHelper.getBusinessInterfaces(
- beanClass, false);
-
- // Determine whether Stateful or Stateless
- boolean isStateless = (container instanceof StatelessContainer) ? true : false;
-
- // EJBTHREE-1127
- // Determine local interface from return value of "create" in Local Home
- if (localHomeAnnotation != null)
- {
- localAndBusinessLocalInterfaces.addAll(ProxyFactoryHelper.getReturnTypesFromCreateMethods(localHomeAnnotation
- .value(), isStateless));
- }
-
- // For each of the business interfaces implemented by the bean class
- for (Class<?> clazz : businessInterfacesImplementedByBeanClass)
- {
- // If @Local is on the interface
- if (clazz.isAnnotationPresent(Local.class))
- {
- // Add to the list of locals
- localAndBusinessLocalInterfaces.add(clazz);
- }
- }
-
- // EJBTHREE-1062
- // EJB 3 Core Specification 4.6.6
- // If bean class implements a single interface, that interface is assumed to be the
- // business interface of the bean. This business interface will be a local interface unless the
- // interface is designated as a remote business interface by use of the Remote
- // annotation on the bean class or interface or by means of the deployment descriptor.
- if (businessInterfacesDirectlyImplementedByBeanClass.size() == 1 && localAndBusinessLocalInterfaces.size() == 0)
- {
- // Obtain the implemented interface
- Class<?> singleInterface = businessInterfacesDirectlyImplementedByBeanClass.iterator().next();
-
- // If not explicitly marked as @Remote, and is a valid business interface
- if (remoteAnnotation == null && singleInterface.getAnnotation(Remote.class) == null)
- {
- // Return the implemented interface, adding to the container
- Class<?>[] returnValue = new Class[]
- {singleInterface};
- Local li = new LocalImpl(returnValue);
- ((EJBContainer) container).getAnnotations().addClassAnnotation(Local.class, li);
- return returnValue;
- }
- }
-
- // @Local was defined
- if (localAnnotation != null)
- {
- // If @Local has no value or empty value
- if (localAnnotation.value() == null || localAnnotation.value().length == 0)
- {
- // If @Local is defined with no value and there are no business interfaces
- if (businessInterfacesImplementedByBeanClass.size() == 0)
- {
- throw new RuntimeException("Use of empty @Local on bean " + container.getEjbName()
- + " and there are no valid business interfaces");
- }
- // If more than one business interface is directly implemented by the bean class
- else if (businessInterfacesImplementedByBeanClass.size() > 1)
- {
- throw new RuntimeException("Use of empty @Local on bean " + container.getEjbName()
- + " with more than one default interface " + businessInterfacesImplementedByBeanClass);
- }
- // JIRA EJBTHREE-1062
- // EJB 3 4.6.6
- // If the bean class implements only one business interface, that
- //interface is exposed as local business if not denoted as @Remote
- else
- {
- // If not explicitly marked as @Remote
- if (remoteAnnotation == null)
- {
- // Return the implemented interface and add to container
- Class<?>[] returnValue = businessInterfacesImplementedByBeanClass.toArray(new Class<?>[]
- {});
- Local li = new LocalImpl(returnValue);
- ((EJBContainer) container).getAnnotations().addClassAnnotation(Local.class, li);
- return returnValue;
- }
- }
- }
- // @Local has value
- else
- {
- // For each of the interfaces in @Local.value
- for (Class<?> clazz : localAnnotation.value())
- {
- // Add to the list of locals
- localAndBusinessLocalInterfaces.add(clazz);
- }
-
- // For each of the business interfaces implemented by the bean class
- for (Class<?> clazz : businessInterfacesImplementedByBeanClass)
- {
- // If @Local is on the interface
- if (clazz.isAnnotationPresent(Local.class))
- {
- // Add to the list of locals
- localAndBusinessLocalInterfaces.add(clazz);
- }
- }
- }
- }
-
- // If local interfaces have been defined/discovered
- if (localAndBusinessLocalInterfaces.size() > 0)
- {
- // Check to ensure @Local and @Remote are not defined on the same interface
- // EJBTHREE-751
- for (Class<?> remoteInterface : remoteAndBusinessRemoteInterfaces)
- {
- for (Class<?> localInterface : localAndBusinessLocalInterfaces)
- {
- if (localInterface.equals(remoteInterface))
- {
- throw new RuntimeException("@Remote and @Local may not both be specified on the same interface \""
- + remoteInterface.toString() + "\" per EJB3 Spec 4.6.7, Bullet 5.4");
- }
- }
- }
-
- // Return local interfaces, first adding to the container
- Class<?>[] rtn = localAndBusinessLocalInterfaces.toArray(new Class<?>[]
- {});
- localAnnotation = new LocalImpl(rtn);
- ((EJBContainer) container).getAnnotations().addClassAnnotation(Local.class, localAnnotation);
- return rtn;
- }
- // If no local interfaces have been defined/discovered
- else
- {
- // Obtain WS Endpoint
- String endpoint = ProxyFactoryHelper.getEndpointInterface(container);
-
- // If neither WS Endpoint or remotes are defined
- if (remoteAndBusinessRemoteInterfaces.length == 0 && endpoint == null)
- throw new RuntimeException(
- "Bean Class "
- + beanClass.getName()
- + " has no local, webservice, or remote interfaces defined and does not implement at least one business interface: "
- + container.getEjbName());
-
- }
-
- // No local or business local interfaces discovered
- return new Class<?>[]
- {};
- }
-
- /**
- * Resolve the potential business interfaces on an enterprise bean.
- * Returns all interfaces implemented by this class and its supers which
- * are potentially a business interface.
- *
- * Note: for normal operation call container.getBusinessInterfaces().
- *
- * @param beanClass the EJB implementation class
- * @return a list of potential business interfaces
- * @see org.jboss.ejb3.EJBContainer#getBusinessInterfaces()
- */
- public static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass)
- {
- // Obtain all business interfaces implemented by this bean class and its superclasses
- return ProxyFactoryHelper.getBusinessInterfaces(beanClass, new HashSet<Class<?>>());
- }
-
- /**
- * Resolve the potential business interfaces on an enterprise bean.
- * Returns all interfaces implemented by this class and, optionally, its supers which
- * are potentially a business interface.
- *
- * Note: for normal operation call container.getBusinessInterfaces().
- *
- * @param beanClass the EJB implementation class
- * @param includeSupers Whether or not to include superclasses of the specified beanClass in this check
- * @return a list of potential business interfaces
- * @see org.jboss.ejb3.EJBContainer#getBusinessInterfaces()
- */
- public static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass, boolean includeSupers)
- {
- // Obtain all business interfaces implemented by this bean class and optionally, its superclass
- return ProxyFactoryHelper.getBusinessInterfaces(beanClass, new HashSet<Class<?>>(), includeSupers);
- }
-
- private static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass, Set<Class<?>> interfaces)
- {
- return ProxyFactoryHelper.getBusinessInterfaces(beanClass, interfaces, true);
- }
-
- private static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass, Set<Class<?>> interfaces,
- boolean includeSupers)
- {
- /*
- * 4.6.6:
- * The following interfaces are excluded when determining whether the bean class has
- * more than one interface: java.io.Serializable; java.io.Externalizable;
- * any of the interfaces defined by the javax.ejb package.
- */
- for (Class<?> intf : beanClass.getInterfaces())
- {
- if (intf.equals(java.io.Externalizable.class))
- continue;
- if (intf.equals(java.io.Serializable.class))
- continue;
- if (intf.getName().startsWith("javax.ejb"))
- continue;
-
- // FIXME Other aop frameworks might add other interfaces, this should really be configurable
- if (intf.getName().startsWith("org.jboss.aop"))
- continue;
-
- interfaces.add(intf);
- }
-
- // If there's no superclass, or we shouldn't check the superclass, return
- if (!includeSupers || beanClass.getSuperclass() == null)
- {
- return interfaces;
- }
- else
- {
- // Include any superclasses' interfaces
- return getBusinessInterfaces(beanClass.getSuperclass(), interfaces);
- }
- }
-
- public static Class<?> getLocalHomeInterface(Container container)
- {
- LocalHome li = ((EJBContainer) container).getAnnotation(javax.ejb.LocalHome.class);
- if (li != null)
- return li.value();
- return null;
- }
-
- public static Class<?> getRemoteHomeInterface(Container container)
- {
- RemoteHome li = ((EJBContainer) container).getAnnotation(javax.ejb.RemoteHome.class);
- if (li != null)
- return li.value();
- return null;
- }
-
- public static boolean publishesInterface(Container container, Class<?> businessInterface)
- {
- if (!(container instanceof SessionContainer))
- return false;
- Class<?>[] remotes = getRemoteAndBusinessRemoteInterfaces(container);
- for (Class<?> intf : remotes)
- {
- if (intf.getName().equals(businessInterface.getName()))
- return true;
- }
-
- Class<?> remoteHome = getRemoteHomeInterface(container);
- if (remoteHome != null)
- {
- if (businessInterface.getName().equals(remoteHome.getName()))
- {
- return true;
- }
- }
- Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
- for (Class<?> clazz : locals)
- {
- if (clazz.getName().equals(businessInterface.getName()))
- {
- return true;
- }
- }
- Class<?> localHome = getLocalHomeInterface(container);
- if (localHome != null)
- {
- if (businessInterface.getName().equals(localHome.getName()))
- {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Obtains the JNDI name for the specified container; may either be explicitly-defined by
- * annotation / XML or will otherwise default to the configured JNDI Binding Policy
- *
- * @param container
- * @param businessInterface
- * @return
- */
- public static String getJndiName(EJBContainer container, Class<?> businessInterface)
- {
- assert container != null : "container is null";
- assert businessInterface != null : "businessInterface is null";
-
- // Initialize to defaults of remote and not home
- String jndiName = null;
- boolean isHome = false;
- boolean isLocal = false;
-
- // Determine if remote
- Class<?>[] remotes = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container);
- for (Class<?> clazz : remotes)
- {
- if (clazz.getName().equals(businessInterface.getName()))
- {
- // Check for declared @RemoteBindings
- RemoteBindings bindings = ((EJBContainer) container).getAnnotation(RemoteBindings.class);
- if (bindings != null)
- {
- // Encountered, return
- return bindings.value()[0].jndiBinding();
- }
- // Check for declared @RemoteBinding
- RemoteBinding binding = ((EJBContainer) container).getAnnotation(RemoteBinding.class);
- if (binding != null)
- {
- // Encountered, return
- return binding.jndiBinding();
- }
- }
- }
-
- // Determine if remote home
- Class<?> remoteHome = getRemoteHomeInterface(container);
- if (remoteHome != null)
- {
- if (businessInterface.getName().equals(remoteHome.getName()))
- {
- // Check for declared @RemoteHomeBinding
- RemoteHomeBinding binding = ((EJBContainer) container).getAnnotation(RemoteHomeBinding.class);
- if (binding != null)
- {
- // Encountered, return
- return binding.jndiBinding();
- }
-
- // Set home for policy
- isHome = true;
- }
- }
-
- // Determine if local and home
- Class<?> localHome = getLocalHomeInterface(container);
- if (localHome != null)
- {
- if (businessInterface.getName().equals(localHome.getName()))
- {
- // Check for declared @LocalHomeBinding
- LocalHomeBinding binding = ((EJBContainer) container).getAnnotation(LocalHomeBinding.class);
- if (binding != null)
- {
- // Encountered, return
- return binding.jndiBinding();
- }
-
- // Set local and home for policy
- isHome = true;
- isLocal = true;
- }
- }
-
- // Determine if local
- Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
- for (Class<?> clazz : locals)
- {
- if (clazz.getName().equals(businessInterface.getName()))
- {
- // Check for declared @LocalBinding
- LocalBinding binding = ((EJBContainer) container).getAnnotation(LocalBinding.class);
- if (binding != null)
- {
- // Encountered, return
- return binding.jndiBinding();
- }
-
- // Set local for policy
- isLocal = true;
- }
- }
-
- // If JNDI Name has not been explicitly specified, use policy
- if (jndiName == null)
- {
- // Log
- log.debug("JNDI name has not been explicitly set for EJB " + container.getEjbName() + ", interface "
- + businessInterface.getName());
-
- // Set JNDI name
- Ejb3DeploymentSummary summary = ProxyFactoryHelper.getDeploymentSummaryFromContainer(container);
- summary.setHome(isHome);
- summary.setLocal(isLocal);
- jndiName = ProxyFactoryHelper.getJndiBindingPolicy(container).getJndiName(summary);
- }
-
- // Return
- return jndiName;
- }
-
- /**
- * Returns all local interfaces in the specified container; interfaces
- * marked as "local" via either annotation or XML and extending EJBLocalObject
- *
- * @param container
- * @return
- */
- public static Class<?>[] getLocalInterfaces(Container container)
- {
- return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
- .getLocalAndBusinessLocalInterfaces(container), EJBLocalObject.class, true);
- }
-
- /**
- * Returns all remote interfaces in the specified container; interfaces
- * marked as "remote" via either annotation or XML and extending EJBObject
- *
- * @param container
- * @return
- */
- public static Class<?>[] getRemoteInterfaces(Container container)
- {
- return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
- .getRemoteAndBusinessRemoteInterfaces(container), EJBObject.class, true);
- }
-
- /**
- * Returns all local business interfaces in the specified container; interfaces
- * marked as "local" via either annotation or XML and not extending EJBLocalObject
- *
- * @param container
- * @return
- */
- public static Class<?>[] getLocalBusinessInterfaces(Container container)
- {
- return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
- .getLocalAndBusinessLocalInterfaces(container), EJBLocalObject.class, false);
- }
-
- /**
- * Returns all remote business interfaces in the specified container; interfaces
- * marked as "remote" via either annotation or XML and not extending EJBObject
- *
- * @param container
- * @return
- */
- public static Class<?>[] getRemoteBusinessInterfaces(Container container)
- {
- return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
- .getRemoteAndBusinessRemoteInterfaces(container), EJBObject.class, false);
- }
-
- /**
- * Returns an subset of the specified array of interfaces either
- * assignable to or not assignable to the specified class, depending
- * upon the flag "assignable"
- *
- * @param interfaces
- * @param clazz
- * @param assignable
- * @return
- */
- private static Class<?>[] getInterfacesAssignableFromClass(Class<?>[] interfaces, Class<?> clazz, boolean assignable)
- {
- // Initialize
- List<Class<?>> subset = new ArrayList<Class<?>>();
-
- // For all interfaces
- for (Class<?> interfaze : interfaces)
- {
- // If we want assignable classes only
- if (assignable && clazz.isAssignableFrom(interfaze))
- {
- subset.add(interfaze);
- }
-
- // If we want classes not assignable only
- if (!assignable && !clazz.isAssignableFrom(interfaze))
- {
- subset.add(interfaze);
- }
- }
-
- // Return
- return subset.toArray(new Class<?>[]
- {});
- }
-
- /**
- * Returns all remote and remote business interfaces in the specified container,
- * designated by @Remote or in ejb-jar.xml as "remote" or "business-remote"
- *
- * @param container
- * @return the remote interfaces of the container or an empty array
- */
- public static Class<?>[] getRemoteAndBusinessRemoteInterfaces(Container container)
- {
- // Initialize
- Remote remoteAnnotation = ((EJBContainer) container).getAnnotation(Remote.class);
- RemoteHome remoteHomeAnnotation = ((EJBContainer) container).getAnnotation(RemoteHome.class);
- Set<Class<?>> remoteAndRemoteBusinessInterfaces = new HashSet<Class<?>>();
- Class<?> beanClass = container.getBeanClass();
- boolean isStateless = (container instanceof StatelessContainer) ? true : false;
-
- // Obtain business interfaces
- Class<?>[] businessInterfaces = ProxyFactoryHelper.getBusinessInterfaces(beanClass).toArray(new Class[]
- {});
-
- // EJBTHREE-1127
- // Determine remote interface from return value of "create" in Remote Home
- if (remoteHomeAnnotation != null)
- {
- remoteAndRemoteBusinessInterfaces.addAll(ProxyFactoryHelper.getReturnTypesFromCreateMethods(
- remoteHomeAnnotation.value(), isStateless));
- }
-
- // If @Remote is not defined
- if (remoteAnnotation == null)
- {
- // For each of the business interfaces
- for (Class<?> clazz : businessInterfaces)
- {
- // If @Remote is on the business interface
- if (clazz.isAnnotationPresent(Remote.class))
- {
- // Add to the list of remotes
- remoteAndRemoteBusinessInterfaces.add(clazz);
- }
- }
- }
- // @Remote was defined
- else
- {
- // @Remote declares interfaces, add these
- if (remoteAnnotation.value().length > 0)
- {
- for (Class<?> clazz : remoteAnnotation.value())
- {
- remoteAndRemoteBusinessInterfaces.add(clazz);
- }
- }
- // @Remote is empty
- else
- {
- // No business interfaces were defined on the bean
- if (businessInterfaces.length == 0)
- {
- throw new RuntimeException("Use of empty @Remote on bean " + container.getEjbName()
- + " and there are no valid business interfaces");
- }
-
- // More than one default interface, cannot be marked as @Remote
- else if (businessInterfaces.length > 1)
- {
- throw new RuntimeException("Use of empty @Remote on bean " + container.getEjbName()
- + " with more than one default interface " + businessInterfaces);
- }
- // Only one default interface, mark as @Remote and return
- else
- {
- Class<?>[] rtn =
- {(Class<?>) businessInterfaces[0]};
- remoteAnnotation = new RemoteImpl(rtn);
- ((EJBContainer) container).getAnnotations().addClassAnnotation(javax.ejb.Remote.class, remoteAnnotation);
- return rtn;
- }
- }
- }
-
- // If remotes were found
- if (remoteAndRemoteBusinessInterfaces.size() > 0)
- {
- // Set interfaces and return
- Class<?>[] remotesArray = remoteAndRemoteBusinessInterfaces
- .toArray(new Class[remoteAndRemoteBusinessInterfaces.size()]);
- remoteAnnotation = new RemoteImpl(remotesArray);
- ((EJBContainer) container).getAnnotations().addClassAnnotation(Remote.class, remoteAnnotation);
- return remoteAnnotation.value();
- }
- // No remotes were found
- else
- {
- return new Class<?>[]
- {};
- }
- }
-
- /**
- * Obtains the return types declared by the "create" methods for the specified home interface.
- *
- * @param homeInterface
- * @param isStateless Flag to indicate whether this is for a Stateful or Stateless container
- * @return
- */
- private static Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface, boolean isStateless)
- {
- // Ensure we've been passed a Home or LocalHome interface (Developers only)
- assert (EJBHome.class.isAssignableFrom(homeInterface) || EJBLocalHome.class.isAssignableFrom(homeInterface));
-
- // Ensure we've been passed a Home or LocalHome interface (End-User)
- if (!EJBHome.class.isAssignableFrom(homeInterface) && !EJBLocalHome.class.isAssignableFrom(homeInterface))
- {
- throw new RuntimeException("Declared EJB 2.1 Home Interface " + homeInterface.getName() + " does not extend "
- + EJBHome.class.getName() + " or " + EJBLocalHome.class.getName()
- + " as required by EJB 3.0 Core Specification 4.6.8 and 4.6.10");
- }
-
- // Initialize
- Set<Class<?>> types = new HashSet<Class<?>>();
- List<Method> createMethods = null;
-
- // If for a Stateless Container
- if (isStateless)
- {
- // Initialize error message
- String specViolationErrorMessage = "EJB 3.0 Specification Violation (4.6.8 Bullet 4, 4.6.10 Bullet 4): \""
- + "A stateless session bean must define exactly one create method with no arguments." + "\"; found in "
- + homeInterface.getName();
-
- // Get all methods with signature "create"
- createMethods = new ArrayList<Method>();
- try
- {
- createMethods.add(homeInterface.getMethod("create", new Class<?>[]
- {}));
- }
- // EJB 3.0 Specification 4.6.8 Bullet 4 Violation
- // EJBTHREE-1156
- catch (NoSuchMethodException e)
- {
- throw new RuntimeException(specViolationErrorMessage);
- }
-
- // Ensure only one create method is defined
- // EJB 3.0 Specification 4.6.8 Bullet 4 Violation
- // EJBTHREE-1156
- if (createMethods.size() > 1)
- {
- throw new RuntimeException(specViolationErrorMessage);
- }
- }
- else
- {
- // Obtain all "create<METHOD>" methods
- createMethods = ClassHelper.getAllMethodsByPrefix(homeInterface, "create");
- }
- if (createMethods.size() == 0)
- {
- throw new RuntimeException("EJB 3.0 Core Specification Violation (4.6.8 Bullet 5): EJB2.1 Home Interface "
- + homeInterface + " does not declare a \'create<METHOD>\' method");
- }
-
- // Add all return types
- for (Method method : createMethods)
- {
- types.add(method.getReturnType());
- }
-
- // Return
- 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;
- }
-
- /**
- * Create a Proxy Constructor for the specified interfaces, using the specified CL
- *
- * @param interfaces
- * @param cl
- * @return
- * @throws Exception
- */
- public static Constructor<?> createProxyConstructor(Class<?>[] interfaces, ClassLoader cl) throws Exception
- {
- Class<?> proxyClass = java.lang.reflect.Proxy.getProxyClass(cl, interfaces);
- return proxyClass.getConstructor(InvocationHandler.class);
- }
-
- public static String getHomeJndiName(EJBContainer container)
- {
- // Use explicitly-specified binding, if defined
- RemoteHomeBinding binding = container.getAnnotation(RemoteHomeBinding.class);
- if (binding != null)
- return binding.jndiBinding();
-
- // Use Default JNDI Binding Policy
- return ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultRemoteHomeJndiName(
- ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
- }
-
- public static String getLocalHomeJndiName(EJBContainer container)
- {
- // Use explicitly-specified binding, if defined
- LocalHomeBinding binding = container.getAnnotation(LocalHomeBinding.class);
- if (binding != null)
- return binding.jndiBinding();
-
- // Use Default JNDI Binding Policy
- return ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalHomeJndiName(
- ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
- }
-
- public static String getLocalJndiName(EJBContainer container)
- {
- return ProxyFactoryHelper.getLocalJndiName(container, true);
- }
-
- private static String getLocalJndiName(EJBContainer container, boolean conflictCheck)
- {
- // See if local binding is explicitly-defined
- LocalBinding localBinding = container.getAnnotation(LocalBinding.class);
-
- // If none specified
- if (localBinding == null)
- {
- // Get JNDI name from policy
- String name = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalJndiName(
- ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
-
- // If we should check for naming conflict
- if (conflictCheck){
- // Check
- ProxyFactoryHelper.checkForJndiNamingConflict(container);
- }
-
- // Return
- return name;
- }
- // Local Binding was explicitly-specified, use it
- else
- {
- return localBinding.jndiBinding();
- }
- }
-
- public static String getRemoteBusinessJndiName(EJBContainer container)
- {
- return ProxyFactoryHelper.getRemoteBusinessJndiName(container, true);
- }
-
- public static String getRemoteBusinessJndiName(EJBContainer container, boolean check)
- {
- RemoteBinding binding = container.getAnnotation(RemoteBinding.class);
-
- return ProxyFactoryHelper.getRemoteBusinessJndiName(container, binding);
- }
-
- private static void checkForJndiNamingConflict(EJBContainer container)
- {
- if (container.getAnnotation(Local.class) != null)
- {
- Ejb3DeploymentSummary summary = ProxyFactoryHelper.getDeploymentSummaryFromContainer(container);
- String localJndiName = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalJndiName(summary);
- String remoteJndiName = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultRemoteJndiName(summary);
- String ejbName = container.getEjbName();
- if ((localJndiName.equals(remoteJndiName)))
- {
- throw new javax.ejb.EJBException("Conflict between default jndi name " + remoteJndiName
- + " for both remote and local for ejb-name:" + ejbName + ", bean class=" + container.getBeanClass());
- }
-
- }
- }
-
- private static String getRemoteBusinessJndiName(EJBContainer container, RemoteBinding binding)
- {
- return ProxyFactoryHelper.getRemoteBusinessJndiName(container, binding, true);
- }
-
- public static String getRemoteBusinessJndiName(EJBContainer container, RemoteBinding binding, boolean conflictCheck)
- {
- // Initialize
- String jndiName = null;
-
- // If binding is not defined
- if (binding == null || binding.jndiBinding() == null || binding.jndiBinding().trim().equals(""))
- {
- // Use the default
- jndiName = getDefaultRemoteBusinessJndiName(container);
-
- // If we should check for a naming conflict
- if (conflictCheck)
- {
- // Check
- ProxyFactoryHelper.checkForJndiNamingConflict(container);
- }
-
- }
- // Binding is explicitly-defined
- else
- {
- // use it
- jndiName = binding.jndiBinding();
- }
-
- // Return
- return jndiName;
- }
-
- public static String getDefaultRemoteBusinessJndiName(EJBContainer container)
- {
- // Obtain JNDI Binding Policy
- DefaultJndiBindingPolicy policy = ProxyFactoryHelper.getJndiBindingPolicy(container);
-
- // Obtain Deployment Summary
- Ejb3DeploymentSummary summary = ProxyFactoryHelper.getDeploymentSummaryFromContainer(container);
-
- // Return the policy's default remote name for this summary
- return policy.getDefaultRemoteJndiName(summary);
- }
-
- /**
- * Obtains the JNDI Binding Policy for the specified container
- *
- * @param container
- * @author ALR
- * @return
- */
- private static DefaultJndiBindingPolicy getJndiBindingPolicy(EJBContainer container)
- {
- // Attempt to obtain the binding policy from annotation repo
- JndiBindingPolicy bindingPolicy = container.getAnnotation(JndiBindingPolicy.class);
-
- // Initialize
- Class<? extends DefaultJndiBindingPolicy> policy = null;
-
- // If policy is defined
- if (bindingPolicy != null){
- // Use it
- policy = bindingPolicy.policy();
- }
- // No policy defined
- else
- {
- // Use default policy
- Class<? extends DefaultJndiBindingPolicy> policyClass = PackagingBasedJndiBindingPolicy.class;
- // Log warning
- log.warn("No default JNDI Binding Policy Defined (see ejb3-interceptors-aop.xml for example); defaulting to "
- + policyClass.getName());
- policy = policyClass;
- }
-
- // Log
- log.debug("Obtaining JNDI name from policy " + policy.getName());
-
- try
- {
- // Instanciate the policy and return
- return policy.newInstance();
- }
- catch (InstantiationException e)
- {
- throw new RuntimeException("Could not instanciate JNDI Binding Policy: " + policy.getName(), e);
- }
- catch (IllegalAccessException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- private static Ejb3DeploymentSummary getDeploymentSummaryFromContainer(EJBContainer container)
- {
- // Construct Deployment Summary
- Ejb3DeploymentSummary summary = new Ejb3DeploymentSummary();
- summary.setEjbName(container.getEjbName());
- summary.setService(container instanceof ServiceContainer);
- summary.setStateful(container instanceof StatefulContainer);
- summary.setDeploymentName(container.getDeployment().getName());
- summary.setBeanClass(container.getBeanClass());
- DeploymentScope scope = container.getDeployment().getEar();
- if (scope != null)
- {
- summary.setDeploymentScopeBaseName(scope.getBaseName());
- }
-
- // Return
- return summary;
- }
-}
\ No newline at end of file
Deleted: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyUtils.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyUtils.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyUtils.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -1,163 +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.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.JBossProxy;
-import org.jboss.ejb3.remoting.ProxyInvocationHandler;
-
-/**
- * @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, ProxyInvocationHandler 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, ProxyInvocationHandler 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;
- }
-}
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/enc/DeploymentEjbResolver.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/enc/DeploymentEjbResolver.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/enc/DeploymentEjbResolver.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -24,9 +24,9 @@
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.Container;
import org.jboss.ejb3.DeploymentScope;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.logging.Logger;
import javax.naming.NameNotFoundException;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MDB.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MDB.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MDB.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -35,8 +35,8 @@
import org.jboss.aop.Domain;
import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.DefaultActivationSpecs;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
import org.jboss.metadata.ejb.spec.NamedMethodMetaData;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MessagingContainer.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MessagingContainer.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/MessagingContainer.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -45,10 +45,10 @@
import org.jboss.ejb3.EJBContainerInvocation;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.ejb3.Ejb3Module;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.ResourceAdapter;
import org.jboss.ejb3.jms.JMSDestinationFactory;
import org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.timerservice.TimedObjectInvoker;
import org.jboss.ejb3.timerservice.TimerServiceFactory;
import org.jboss.jms.jndi.JMSProviderAdapter;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -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.remoting.RemoteProxyFactory;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.util.naming.Util;
/**
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyUtils.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,162 @@
+/*
+ * 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.ProxyInvocationHandler;
+
+/**
+ * @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, ProxyInvocationHandler 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, ProxyInvocationHandler 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;
+ }
+}
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/ProxyUtils.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/BaseSessionProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -46,7 +46,6 @@
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.SpecificationInterfaceType;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.proxy.JBossProxy;
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,1057 @@
+/*
+ * 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.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.ejb.EJBHome;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.jws.WebService;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.Container;
+import org.jboss.ejb3.DeploymentScope;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.KernelAbstraction;
+import org.jboss.ejb3.KernelAbstractionFactory;
+import org.jboss.ejb3.annotation.JndiBindingPolicy;
+import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.annotation.LocalHomeBinding;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteBindings;
+import org.jboss.ejb3.annotation.RemoteHomeBinding;
+import org.jboss.ejb3.annotation.impl.LocalImpl;
+import org.jboss.ejb3.annotation.impl.RemoteImpl;
+import org.jboss.ejb3.jndipolicy.DefaultJndiBindingPolicy;
+import org.jboss.ejb3.jndipolicy.Ejb3DeploymentSummary;
+import org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy;
+import org.jboss.ejb3.lang.ClassHelper;
+import org.jboss.ejb3.service.ServiceContainer;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.stateful.StatefulContainer;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+public class ProxyFactoryHelper
+{
+ private static final Logger log = Logger.getLogger(ProxyFactoryHelper.class);
+
+ private static String getEndpointInterface(Container container)
+ {
+ WebService ws = (javax.jws.WebService) ((EJBContainer) container).resolveAnnotation(javax.jws.WebService.class);
+ if (ws != null)
+ {
+ return ws.endpointInterface();
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param container
+ * @return the local interfaces of the container or an empty array
+ */
+ public static Class<?>[] getLocalAndBusinessLocalInterfaces(Container container)
+ {
+ // Initialize
+ Set<Class<?>> localAndBusinessLocalInterfaces = new HashSet<Class<?>>();
+
+ // Obtain Bean Class
+ Class<?> beanClass = container.getBeanClass();
+
+ // Obtain @Local
+ Local localAnnotation = ((EJBContainer) container).getAnnotation(Local.class);
+
+ // Obtain @LocalHome
+ LocalHome localHomeAnnotation = ((EJBContainer) container).getAnnotation(LocalHome.class);
+
+ // Obtain @Remote
+ Remote remoteAnnotation = ((EJBContainer) container).getAnnotation(Remote.class);
+
+ // Obtain Remote and Business Remote interfaces
+ Class<?>[] remoteAndBusinessRemoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container);
+
+ // Obtain all business interfaces from the bean class
+ Set<Class<?>> businessInterfacesImplementedByBeanClass = ProxyFactoryHelper.getBusinessInterfaces(beanClass);
+
+ // Obtain all business interfaces directly implemented by the bean class (not including supers)
+ Set<Class<?>> businessInterfacesDirectlyImplementedByBeanClass = ProxyFactoryHelper.getBusinessInterfaces(
+ beanClass, false);
+
+ // Determine whether Stateful or Stateless
+ boolean isStateless = (container instanceof StatelessContainer) ? true : false;
+
+ // EJBTHREE-1127
+ // Determine local interface from return value of "create" in Local Home
+ if (localHomeAnnotation != null)
+ {
+ localAndBusinessLocalInterfaces.addAll(ProxyFactoryHelper.getReturnTypesFromCreateMethods(localHomeAnnotation
+ .value(), isStateless));
+ }
+
+ // For each of the business interfaces implemented by the bean class
+ for (Class<?> clazz : businessInterfacesImplementedByBeanClass)
+ {
+ // If @Local is on the interface
+ if (clazz.isAnnotationPresent(Local.class))
+ {
+ // Add to the list of locals
+ localAndBusinessLocalInterfaces.add(clazz);
+ }
+ }
+
+ // EJBTHREE-1062
+ // EJB 3 Core Specification 4.6.6
+ // If bean class implements a single interface, that interface is assumed to be the
+ // business interface of the bean. This business interface will be a local interface unless the
+ // interface is designated as a remote business interface by use of the Remote
+ // annotation on the bean class or interface or by means of the deployment descriptor.
+ if (businessInterfacesDirectlyImplementedByBeanClass.size() == 1 && localAndBusinessLocalInterfaces.size() == 0)
+ {
+ // Obtain the implemented interface
+ Class<?> singleInterface = businessInterfacesDirectlyImplementedByBeanClass.iterator().next();
+
+ // If not explicitly marked as @Remote, and is a valid business interface
+ if (remoteAnnotation == null && singleInterface.getAnnotation(Remote.class) == null)
+ {
+ // Return the implemented interface, adding to the container
+ Class<?>[] returnValue = new Class[]
+ {singleInterface};
+ Local li = new LocalImpl(returnValue);
+ ((EJBContainer) container).getAnnotations().addClassAnnotation(Local.class, li);
+ return returnValue;
+ }
+ }
+
+ // @Local was defined
+ if (localAnnotation != null)
+ {
+ // If @Local has no value or empty value
+ if (localAnnotation.value() == null || localAnnotation.value().length == 0)
+ {
+ // If @Local is defined with no value and there are no business interfaces
+ if (businessInterfacesImplementedByBeanClass.size() == 0)
+ {
+ throw new RuntimeException("Use of empty @Local on bean " + container.getEjbName()
+ + " and there are no valid business interfaces");
+ }
+ // If more than one business interface is directly implemented by the bean class
+ else if (businessInterfacesImplementedByBeanClass.size() > 1)
+ {
+ throw new RuntimeException("Use of empty @Local on bean " + container.getEjbName()
+ + " with more than one default interface " + businessInterfacesImplementedByBeanClass);
+ }
+ // JIRA EJBTHREE-1062
+ // EJB 3 4.6.6
+ // If the bean class implements only one business interface, that
+ //interface is exposed as local business if not denoted as @Remote
+ else
+ {
+ // If not explicitly marked as @Remote
+ if (remoteAnnotation == null)
+ {
+ // Return the implemented interface and add to container
+ Class<?>[] returnValue = businessInterfacesImplementedByBeanClass.toArray(new Class<?>[]
+ {});
+ Local li = new LocalImpl(returnValue);
+ ((EJBContainer) container).getAnnotations().addClassAnnotation(Local.class, li);
+ return returnValue;
+ }
+ }
+ }
+ // @Local has value
+ else
+ {
+ // For each of the interfaces in @Local.value
+ for (Class<?> clazz : localAnnotation.value())
+ {
+ // Add to the list of locals
+ localAndBusinessLocalInterfaces.add(clazz);
+ }
+
+ // For each of the business interfaces implemented by the bean class
+ for (Class<?> clazz : businessInterfacesImplementedByBeanClass)
+ {
+ // If @Local is on the interface
+ if (clazz.isAnnotationPresent(Local.class))
+ {
+ // Add to the list of locals
+ localAndBusinessLocalInterfaces.add(clazz);
+ }
+ }
+ }
+ }
+
+ // If local interfaces have been defined/discovered
+ if (localAndBusinessLocalInterfaces.size() > 0)
+ {
+ // Check to ensure @Local and @Remote are not defined on the same interface
+ // EJBTHREE-751
+ for (Class<?> remoteInterface : remoteAndBusinessRemoteInterfaces)
+ {
+ for (Class<?> localInterface : localAndBusinessLocalInterfaces)
+ {
+ if (localInterface.equals(remoteInterface))
+ {
+ throw new RuntimeException("@Remote and @Local may not both be specified on the same interface \""
+ + remoteInterface.toString() + "\" per EJB3 Spec 4.6.7, Bullet 5.4");
+ }
+ }
+ }
+
+ // Return local interfaces, first adding to the container
+ Class<?>[] rtn = localAndBusinessLocalInterfaces.toArray(new Class<?>[]
+ {});
+ localAnnotation = new LocalImpl(rtn);
+ ((EJBContainer) container).getAnnotations().addClassAnnotation(Local.class, localAnnotation);
+ return rtn;
+ }
+ // If no local interfaces have been defined/discovered
+ else
+ {
+ // Obtain WS Endpoint
+ String endpoint = ProxyFactoryHelper.getEndpointInterface(container);
+
+ // If neither WS Endpoint or remotes are defined
+ if (remoteAndBusinessRemoteInterfaces.length == 0 && endpoint == null)
+ throw new RuntimeException(
+ "Bean Class "
+ + beanClass.getName()
+ + " has no local, webservice, or remote interfaces defined and does not implement at least one business interface: "
+ + container.getEjbName());
+
+ }
+
+ // No local or business local interfaces discovered
+ return new Class<?>[]
+ {};
+ }
+
+ /**
+ * Resolve the potential business interfaces on an enterprise bean.
+ * Returns all interfaces implemented by this class and its supers which
+ * are potentially a business interface.
+ *
+ * Note: for normal operation call container.getBusinessInterfaces().
+ *
+ * @param beanClass the EJB implementation class
+ * @return a list of potential business interfaces
+ * @see org.jboss.ejb3.EJBContainer#getBusinessInterfaces()
+ */
+ public static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass)
+ {
+ // Obtain all business interfaces implemented by this bean class and its superclasses
+ return ProxyFactoryHelper.getBusinessInterfaces(beanClass, new HashSet<Class<?>>());
+ }
+
+ /**
+ * Resolve the potential business interfaces on an enterprise bean.
+ * Returns all interfaces implemented by this class and, optionally, its supers which
+ * are potentially a business interface.
+ *
+ * Note: for normal operation call container.getBusinessInterfaces().
+ *
+ * @param beanClass the EJB implementation class
+ * @param includeSupers Whether or not to include superclasses of the specified beanClass in this check
+ * @return a list of potential business interfaces
+ * @see org.jboss.ejb3.EJBContainer#getBusinessInterfaces()
+ */
+ public static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass, boolean includeSupers)
+ {
+ // Obtain all business interfaces implemented by this bean class and optionally, its superclass
+ return ProxyFactoryHelper.getBusinessInterfaces(beanClass, new HashSet<Class<?>>(), includeSupers);
+ }
+
+ private static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass, Set<Class<?>> interfaces)
+ {
+ return ProxyFactoryHelper.getBusinessInterfaces(beanClass, interfaces, true);
+ }
+
+ private static Set<Class<?>> getBusinessInterfaces(Class<?> beanClass, Set<Class<?>> interfaces,
+ boolean includeSupers)
+ {
+ /*
+ * 4.6.6:
+ * The following interfaces are excluded when determining whether the bean class has
+ * more than one interface: java.io.Serializable; java.io.Externalizable;
+ * any of the interfaces defined by the javax.ejb package.
+ */
+ for (Class<?> intf : beanClass.getInterfaces())
+ {
+ if (intf.equals(java.io.Externalizable.class))
+ continue;
+ if (intf.equals(java.io.Serializable.class))
+ continue;
+ if (intf.getName().startsWith("javax.ejb"))
+ continue;
+
+ // FIXME Other aop frameworks might add other interfaces, this should really be configurable
+ if (intf.getName().startsWith("org.jboss.aop"))
+ continue;
+
+ interfaces.add(intf);
+ }
+
+ // If there's no superclass, or we shouldn't check the superclass, return
+ if (!includeSupers || beanClass.getSuperclass() == null)
+ {
+ return interfaces;
+ }
+ else
+ {
+ // Include any superclasses' interfaces
+ return getBusinessInterfaces(beanClass.getSuperclass(), interfaces);
+ }
+ }
+
+ public static Class<?> getLocalHomeInterface(Container container)
+ {
+ LocalHome li = ((EJBContainer) container).getAnnotation(javax.ejb.LocalHome.class);
+ if (li != null)
+ return li.value();
+ return null;
+ }
+
+ public static Class<?> getRemoteHomeInterface(Container container)
+ {
+ RemoteHome li = ((EJBContainer) container).getAnnotation(javax.ejb.RemoteHome.class);
+ if (li != null)
+ return li.value();
+ return null;
+ }
+
+ public static boolean publishesInterface(Container container, Class<?> businessInterface)
+ {
+ if (!(container instanceof SessionContainer))
+ return false;
+ Class<?>[] remotes = getRemoteAndBusinessRemoteInterfaces(container);
+ for (Class<?> intf : remotes)
+ {
+ if (intf.getName().equals(businessInterface.getName()))
+ return true;
+ }
+
+ Class<?> remoteHome = getRemoteHomeInterface(container);
+ if (remoteHome != null)
+ {
+ if (businessInterface.getName().equals(remoteHome.getName()))
+ {
+ return true;
+ }
+ }
+ Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
+ for (Class<?> clazz : locals)
+ {
+ if (clazz.getName().equals(businessInterface.getName()))
+ {
+ return true;
+ }
+ }
+ Class<?> localHome = getLocalHomeInterface(container);
+ if (localHome != null)
+ {
+ if (businessInterface.getName().equals(localHome.getName()))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Obtains the JNDI name for the specified container; may either be explicitly-defined by
+ * annotation / XML or will otherwise default to the configured JNDI Binding Policy
+ *
+ * @param container
+ * @param businessInterface
+ * @return
+ */
+ public static String getJndiName(EJBContainer container, Class<?> businessInterface)
+ {
+ assert container != null : "container is null";
+ assert businessInterface != null : "businessInterface is null";
+
+ // Initialize to defaults of remote and not home
+ String jndiName = null;
+ boolean isHome = false;
+ boolean isLocal = false;
+
+ // Determine if remote
+ Class<?>[] remotes = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container);
+ for (Class<?> clazz : remotes)
+ {
+ if (clazz.getName().equals(businessInterface.getName()))
+ {
+ // Check for declared @RemoteBindings
+ RemoteBindings bindings = ((EJBContainer) container).getAnnotation(RemoteBindings.class);
+ if (bindings != null)
+ {
+ // Encountered, return
+ return bindings.value()[0].jndiBinding();
+ }
+ // Check for declared @RemoteBinding
+ RemoteBinding binding = ((EJBContainer) container).getAnnotation(RemoteBinding.class);
+ if (binding != null)
+ {
+ // Encountered, return
+ return binding.jndiBinding();
+ }
+ }
+ }
+
+ // Determine if remote home
+ Class<?> remoteHome = getRemoteHomeInterface(container);
+ if (remoteHome != null)
+ {
+ if (businessInterface.getName().equals(remoteHome.getName()))
+ {
+ // Check for declared @RemoteHomeBinding
+ RemoteHomeBinding binding = ((EJBContainer) container).getAnnotation(RemoteHomeBinding.class);
+ if (binding != null)
+ {
+ // Encountered, return
+ return binding.jndiBinding();
+ }
+
+ // Set home for policy
+ isHome = true;
+ }
+ }
+
+ // Determine if local and home
+ Class<?> localHome = getLocalHomeInterface(container);
+ if (localHome != null)
+ {
+ if (businessInterface.getName().equals(localHome.getName()))
+ {
+ // Check for declared @LocalHomeBinding
+ LocalHomeBinding binding = ((EJBContainer) container).getAnnotation(LocalHomeBinding.class);
+ if (binding != null)
+ {
+ // Encountered, return
+ return binding.jndiBinding();
+ }
+
+ // Set local and home for policy
+ isHome = true;
+ isLocal = true;
+ }
+ }
+
+ // Determine if local
+ Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
+ for (Class<?> clazz : locals)
+ {
+ if (clazz.getName().equals(businessInterface.getName()))
+ {
+ // Check for declared @LocalBinding
+ LocalBinding binding = ((EJBContainer) container).getAnnotation(LocalBinding.class);
+ if (binding != null)
+ {
+ // Encountered, return
+ return binding.jndiBinding();
+ }
+
+ // Set local for policy
+ isLocal = true;
+ }
+ }
+
+ // If JNDI Name has not been explicitly specified, use policy
+ if (jndiName == null)
+ {
+ // Log
+ log.debug("JNDI name has not been explicitly set for EJB " + container.getEjbName() + ", interface "
+ + businessInterface.getName());
+
+ // Set JNDI name
+ Ejb3DeploymentSummary summary = ProxyFactoryHelper.getDeploymentSummaryFromContainer(container);
+ summary.setHome(isHome);
+ summary.setLocal(isLocal);
+ jndiName = ProxyFactoryHelper.getJndiBindingPolicy(container).getJndiName(summary);
+ }
+
+ // Return
+ return jndiName;
+ }
+
+ /**
+ * Returns all local interfaces in the specified container; interfaces
+ * marked as "local" via either annotation or XML and extending EJBLocalObject
+ *
+ * @param container
+ * @return
+ */
+ public static Class<?>[] getLocalInterfaces(Container container)
+ {
+ return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
+ .getLocalAndBusinessLocalInterfaces(container), EJBLocalObject.class, true);
+ }
+
+ /**
+ * Returns all remote interfaces in the specified container; interfaces
+ * marked as "remote" via either annotation or XML and extending EJBObject
+ *
+ * @param container
+ * @return
+ */
+ public static Class<?>[] getRemoteInterfaces(Container container)
+ {
+ return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
+ .getRemoteAndBusinessRemoteInterfaces(container), EJBObject.class, true);
+ }
+
+ /**
+ * Returns all local business interfaces in the specified container; interfaces
+ * marked as "local" via either annotation or XML and not extending EJBLocalObject
+ *
+ * @param container
+ * @return
+ */
+ public static Class<?>[] getLocalBusinessInterfaces(Container container)
+ {
+ return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
+ .getLocalAndBusinessLocalInterfaces(container), EJBLocalObject.class, false);
+ }
+
+ /**
+ * Returns all remote business interfaces in the specified container; interfaces
+ * marked as "remote" via either annotation or XML and not extending EJBObject
+ *
+ * @param container
+ * @return
+ */
+ public static Class<?>[] getRemoteBusinessInterfaces(Container container)
+ {
+ return ProxyFactoryHelper.getInterfacesAssignableFromClass(ProxyFactoryHelper
+ .getRemoteAndBusinessRemoteInterfaces(container), EJBObject.class, false);
+ }
+
+ /**
+ * Returns an subset of the specified array of interfaces either
+ * assignable to or not assignable to the specified class, depending
+ * upon the flag "assignable"
+ *
+ * @param interfaces
+ * @param clazz
+ * @param assignable
+ * @return
+ */
+ private static Class<?>[] getInterfacesAssignableFromClass(Class<?>[] interfaces, Class<?> clazz, boolean assignable)
+ {
+ // Initialize
+ List<Class<?>> subset = new ArrayList<Class<?>>();
+
+ // For all interfaces
+ for (Class<?> interfaze : interfaces)
+ {
+ // If we want assignable classes only
+ if (assignable && clazz.isAssignableFrom(interfaze))
+ {
+ subset.add(interfaze);
+ }
+
+ // If we want classes not assignable only
+ if (!assignable && !clazz.isAssignableFrom(interfaze))
+ {
+ subset.add(interfaze);
+ }
+ }
+
+ // Return
+ return subset.toArray(new Class<?>[]
+ {});
+ }
+
+ /**
+ * Returns all remote and remote business interfaces in the specified container,
+ * designated by @Remote or in ejb-jar.xml as "remote" or "business-remote"
+ *
+ * @param container
+ * @return the remote interfaces of the container or an empty array
+ */
+ public static Class<?>[] getRemoteAndBusinessRemoteInterfaces(Container container)
+ {
+ // Initialize
+ Remote remoteAnnotation = ((EJBContainer) container).getAnnotation(Remote.class);
+ RemoteHome remoteHomeAnnotation = ((EJBContainer) container).getAnnotation(RemoteHome.class);
+ Set<Class<?>> remoteAndRemoteBusinessInterfaces = new HashSet<Class<?>>();
+ Class<?> beanClass = container.getBeanClass();
+ boolean isStateless = (container instanceof StatelessContainer) ? true : false;
+
+ // Obtain business interfaces
+ Class<?>[] businessInterfaces = ProxyFactoryHelper.getBusinessInterfaces(beanClass).toArray(new Class[]
+ {});
+
+ // EJBTHREE-1127
+ // Determine remote interface from return value of "create" in Remote Home
+ if (remoteHomeAnnotation != null)
+ {
+ remoteAndRemoteBusinessInterfaces.addAll(ProxyFactoryHelper.getReturnTypesFromCreateMethods(
+ remoteHomeAnnotation.value(), isStateless));
+ }
+
+ // If @Remote is not defined
+ if (remoteAnnotation == null)
+ {
+ // For each of the business interfaces
+ for (Class<?> clazz : businessInterfaces)
+ {
+ // If @Remote is on the business interface
+ if (clazz.isAnnotationPresent(Remote.class))
+ {
+ // Add to the list of remotes
+ remoteAndRemoteBusinessInterfaces.add(clazz);
+ }
+ }
+ }
+ // @Remote was defined
+ else
+ {
+ // @Remote declares interfaces, add these
+ if (remoteAnnotation.value().length > 0)
+ {
+ for (Class<?> clazz : remoteAnnotation.value())
+ {
+ remoteAndRemoteBusinessInterfaces.add(clazz);
+ }
+ }
+ // @Remote is empty
+ else
+ {
+ // No business interfaces were defined on the bean
+ if (businessInterfaces.length == 0)
+ {
+ throw new RuntimeException("Use of empty @Remote on bean " + container.getEjbName()
+ + " and there are no valid business interfaces");
+ }
+
+ // More than one default interface, cannot be marked as @Remote
+ else if (businessInterfaces.length > 1)
+ {
+ throw new RuntimeException("Use of empty @Remote on bean " + container.getEjbName()
+ + " with more than one default interface " + businessInterfaces);
+ }
+ // Only one default interface, mark as @Remote and return
+ else
+ {
+ Class<?>[] rtn =
+ {(Class<?>) businessInterfaces[0]};
+ remoteAnnotation = new RemoteImpl(rtn);
+ ((EJBContainer) container).getAnnotations().addClassAnnotation(javax.ejb.Remote.class, remoteAnnotation);
+ return rtn;
+ }
+ }
+ }
+
+ // If remotes were found
+ if (remoteAndRemoteBusinessInterfaces.size() > 0)
+ {
+ // Set interfaces and return
+ Class<?>[] remotesArray = remoteAndRemoteBusinessInterfaces
+ .toArray(new Class[remoteAndRemoteBusinessInterfaces.size()]);
+ remoteAnnotation = new RemoteImpl(remotesArray);
+ ((EJBContainer) container).getAnnotations().addClassAnnotation(Remote.class, remoteAnnotation);
+ return remoteAnnotation.value();
+ }
+ // No remotes were found
+ else
+ {
+ return new Class<?>[]
+ {};
+ }
+ }
+
+ /**
+ * Obtains the return types declared by the "create" methods for the specified home interface.
+ *
+ * @param homeInterface
+ * @param isStateless Flag to indicate whether this is for a Stateful or Stateless container
+ * @return
+ */
+ private static Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface, boolean isStateless)
+ {
+ // Ensure we've been passed a Home or LocalHome interface (Developers only)
+ assert (EJBHome.class.isAssignableFrom(homeInterface) || EJBLocalHome.class.isAssignableFrom(homeInterface));
+
+ // Ensure we've been passed a Home or LocalHome interface (End-User)
+ if (!EJBHome.class.isAssignableFrom(homeInterface) && !EJBLocalHome.class.isAssignableFrom(homeInterface))
+ {
+ throw new RuntimeException("Declared EJB 2.1 Home Interface " + homeInterface.getName() + " does not extend "
+ + EJBHome.class.getName() + " or " + EJBLocalHome.class.getName()
+ + " as required by EJB 3.0 Core Specification 4.6.8 and 4.6.10");
+ }
+
+ // Initialize
+ Set<Class<?>> types = new HashSet<Class<?>>();
+ List<Method> createMethods = null;
+
+ // If for a Stateless Container
+ if (isStateless)
+ {
+ // Initialize error message
+ String specViolationErrorMessage = "EJB 3.0 Specification Violation (4.6.8 Bullet 4, 4.6.10 Bullet 4): \""
+ + "A stateless session bean must define exactly one create method with no arguments." + "\"; found in "
+ + homeInterface.getName();
+
+ // Get all methods with signature "create"
+ createMethods = new ArrayList<Method>();
+ try
+ {
+ createMethods.add(homeInterface.getMethod("create", new Class<?>[]
+ {}));
+ }
+ // EJB 3.0 Specification 4.6.8 Bullet 4 Violation
+ // EJBTHREE-1156
+ catch (NoSuchMethodException e)
+ {
+ throw new RuntimeException(specViolationErrorMessage);
+ }
+
+ // Ensure only one create method is defined
+ // EJB 3.0 Specification 4.6.8 Bullet 4 Violation
+ // EJBTHREE-1156
+ if (createMethods.size() > 1)
+ {
+ throw new RuntimeException(specViolationErrorMessage);
+ }
+ }
+ else
+ {
+ // Obtain all "create<METHOD>" methods
+ createMethods = ClassHelper.getAllMethodsByPrefix(homeInterface, "create");
+ }
+ if (createMethods.size() == 0)
+ {
+ throw new RuntimeException("EJB 3.0 Core Specification Violation (4.6.8 Bullet 5): EJB2.1 Home Interface "
+ + homeInterface + " does not declare a \'create<METHOD>\' method");
+ }
+
+ // Add all return types
+ for (Method method : createMethods)
+ {
+ types.add(method.getReturnType());
+ }
+
+ // Return
+ 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;
+ }
+
+ /**
+ * Create a Proxy Constructor for the specified interfaces, using the specified CL
+ *
+ * @param interfaces
+ * @param cl
+ * @return
+ * @throws Exception
+ */
+ public static Constructor<?> createProxyConstructor(Class<?>[] interfaces, ClassLoader cl) throws Exception
+ {
+ Class<?> proxyClass = java.lang.reflect.Proxy.getProxyClass(cl, interfaces);
+ return proxyClass.getConstructor(InvocationHandler.class);
+ }
+
+ public static String getHomeJndiName(EJBContainer container)
+ {
+ // Use explicitly-specified binding, if defined
+ RemoteHomeBinding binding = container.getAnnotation(RemoteHomeBinding.class);
+ if (binding != null)
+ return binding.jndiBinding();
+
+ // Use Default JNDI Binding Policy
+ return ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultRemoteHomeJndiName(
+ ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
+ }
+
+ public static String getLocalHomeJndiName(EJBContainer container)
+ {
+ // Use explicitly-specified binding, if defined
+ LocalHomeBinding binding = container.getAnnotation(LocalHomeBinding.class);
+ if (binding != null)
+ return binding.jndiBinding();
+
+ // Use Default JNDI Binding Policy
+ return ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalHomeJndiName(
+ ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
+ }
+
+ public static String getLocalJndiName(EJBContainer container)
+ {
+ return ProxyFactoryHelper.getLocalJndiName(container, true);
+ }
+
+ private static String getLocalJndiName(EJBContainer container, boolean conflictCheck)
+ {
+ // See if local binding is explicitly-defined
+ LocalBinding localBinding = container.getAnnotation(LocalBinding.class);
+
+ // If none specified
+ if (localBinding == null)
+ {
+ // Get JNDI name from policy
+ String name = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalJndiName(
+ ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
+
+ // If we should check for naming conflict
+ if (conflictCheck){
+ // Check
+ ProxyFactoryHelper.checkForJndiNamingConflict(container);
+ }
+
+ // Return
+ return name;
+ }
+ // Local Binding was explicitly-specified, use it
+ else
+ {
+ return localBinding.jndiBinding();
+ }
+ }
+
+ public static String getRemoteBusinessJndiName(EJBContainer container)
+ {
+ return ProxyFactoryHelper.getRemoteBusinessJndiName(container, true);
+ }
+
+ public static String getRemoteBusinessJndiName(EJBContainer container, boolean check)
+ {
+ RemoteBinding binding = container.getAnnotation(RemoteBinding.class);
+
+ return ProxyFactoryHelper.getRemoteBusinessJndiName(container, binding);
+ }
+
+ private static void checkForJndiNamingConflict(EJBContainer container)
+ {
+ if (container.getAnnotation(Local.class) != null)
+ {
+ Ejb3DeploymentSummary summary = ProxyFactoryHelper.getDeploymentSummaryFromContainer(container);
+ String localJndiName = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalJndiName(summary);
+ String remoteJndiName = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultRemoteJndiName(summary);
+ String ejbName = container.getEjbName();
+ if ((localJndiName.equals(remoteJndiName)))
+ {
+ throw new javax.ejb.EJBException("Conflict between default jndi name " + remoteJndiName
+ + " for both remote and local for ejb-name:" + ejbName + ", bean class=" + container.getBeanClass());
+ }
+
+ }
+ }
+
+ private static String getRemoteBusinessJndiName(EJBContainer container, RemoteBinding binding)
+ {
+ return ProxyFactoryHelper.getRemoteBusinessJndiName(container, binding, true);
+ }
+
+ public static String getRemoteBusinessJndiName(EJBContainer container, RemoteBinding binding, boolean conflictCheck)
+ {
+ // Initialize
+ String jndiName = null;
+
+ // If binding is not defined
+ if (binding == null || binding.jndiBinding() == null || binding.jndiBinding().trim().equals(""))
+ {
+ // Use the default
+ jndiName = getDefaultRemoteBusinessJndiName(container);
+
+ // If we should check for a naming conflict
+ if (conflictCheck)
+ {
+ // Check
+ ProxyFactoryHelper.checkForJndiNamingConflict(container);
+ }
+
+ }
+ // Binding is explicitly-defined
+ else
+ {
+ // use it
+ jndiName = binding.jndiBinding();
+ }
+
+ // Return
+ return jndiName;
+ }
+
+ public static String getDefaultRemoteBusinessJndiName(EJBContainer container)
+ {
+ // Obtain JNDI Binding Policy
+ DefaultJndiBindingPolicy policy = ProxyFactoryHelper.getJndiBindingPolicy(container);
+
+ // Obtain Deployment Summary
+ Ejb3DeploymentSummary summary = ProxyFactoryHelper.getDeploymentSummaryFromContainer(container);
+
+ // Return the policy's default remote name for this summary
+ return policy.getDefaultRemoteJndiName(summary);
+ }
+
+ /**
+ * Obtains the JNDI Binding Policy for the specified container
+ *
+ * @param container
+ * @author ALR
+ * @return
+ */
+ private static DefaultJndiBindingPolicy getJndiBindingPolicy(EJBContainer container)
+ {
+ // Attempt to obtain the binding policy from annotation repo
+ JndiBindingPolicy bindingPolicy = container.getAnnotation(JndiBindingPolicy.class);
+
+ // Initialize
+ Class<? extends DefaultJndiBindingPolicy> policy = null;
+
+ // If policy is defined
+ if (bindingPolicy != null){
+ // Use it
+ policy = bindingPolicy.policy();
+ }
+ // No policy defined
+ else
+ {
+ // Use default policy
+ Class<? extends DefaultJndiBindingPolicy> policyClass = PackagingBasedJndiBindingPolicy.class;
+ // Log warning
+ log.warn("No default JNDI Binding Policy Defined (see ejb3-interceptors-aop.xml for example); defaulting to "
+ + policyClass.getName());
+ policy = policyClass;
+ }
+
+ // Log
+ log.debug("Obtaining JNDI name from policy " + policy.getName());
+
+ try
+ {
+ // Instanciate the policy and return
+ return policy.newInstance();
+ }
+ catch (InstantiationException e)
+ {
+ throw new RuntimeException("Could not instanciate JNDI Binding Policy: " + policy.getName(), e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private static Ejb3DeploymentSummary getDeploymentSummaryFromContainer(EJBContainer container)
+ {
+ // Construct Deployment Summary
+ Ejb3DeploymentSummary summary = new Ejb3DeploymentSummary();
+ summary.setEjbName(container.getEjbName());
+ summary.setService(container instanceof ServiceContainer);
+ summary.setStateful(container instanceof StatefulContainer);
+ summary.setDeploymentName(container.getDeployment().getName());
+ summary.setBeanClass(container.getBeanClass());
+ DeploymentScope scope = container.getDeployment().getEar();
+ if (scope != null)
+ {
+ summary.setDeploymentScopeBaseName(scope.getBaseName());
+ }
+
+ // Return
+ return summary;
+ }
+}
\ No newline at end of file
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,51 @@
+/*
+ * 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);
+ }
+
+}
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryNotRegisteredException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactory.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,37 @@
+/*
+ * 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);
+}
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactory.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,105 @@
+/*
+ * 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;
+
+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: $
+ */
+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
+ *
+ * @param name The registered name of the proxy factory to retrieve
+ * @return The Proxy Factory
+ */
+ 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;
+
+ }
+}
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/RemoteProxyFactoryRegistry.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceLocalProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceLocalProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceLocalProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -26,9 +26,9 @@
import java.util.HashSet;
import java.util.Set;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.LocalBinding;
import org.jboss.ejb3.proxy.JBossProxy;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.proxy.handler.service.ServiceLocalProxyInvocationHandler;
import org.jboss.ejb3.service.ServiceContainer;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceRemoteProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceRemoteProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/service/ServiceRemoteProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -28,11 +28,11 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AdviceStack;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.proxy.JBossProxy;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.ejb3.proxy.handler.service.ServiceRemoteProxyInvocationHandler;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
import org.jboss.ejb3.service.ServiceContainer;
import org.jboss.remoting.InvokerLocator;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/BaseStatefulRemoteProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -26,11 +26,11 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AdviceStack;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.SpecificationInterfaceType;
import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.ejb3.proxy.handler.stateful.StatefulRemoteProxyInvocationHandler;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
import org.jboss.ejb3.session.ProxyAccessType;
import org.jboss.ejb3.session.SessionContainer;
import org.jboss.ejb3.session.SessionSpecContainer;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulClusterProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -30,14 +30,14 @@
import org.jboss.aop.Dispatcher;
import org.jboss.aspects.remoting.FamilyWrapper;
import org.jboss.aspects.remoting.Remoting;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.Clustered;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.annotation.defaults.ClusteredDefaults;
import org.jboss.ejb3.proxy.ProxyFactory;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactoryRegistry;
import org.jboss.ejb3.remoting.LoadBalancePolicyNotRegisteredException;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
-import org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry;
import org.jboss.ejb3.session.ProxyAccessType;
import org.jboss.ejb3.session.SessionContainer;
import org.jboss.ejb3.session.SessionSpecContainer;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateful/StatefulRemoteProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -32,13 +32,13 @@
import org.jboss.aop.advice.Interceptor;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.aspects.remoting.PojiProxy;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.proxy.ProxyFactory;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.ejb3.proxy.handler.BaseSessionRemoteProxyInvocationHandler;
import org.jboss.ejb3.proxy.handler.stateful.StatefulHomeRemoteProxyInvocationHandler;
import org.jboss.ejb3.remoting.IsLocalProxyFactoryInterceptor;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
import org.jboss.ejb3.session.SessionContainer;
import org.jboss.ejb3.session.SessionSpecContainer;
import org.jboss.logging.Logger;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/BaseStatelessRemoteProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -5,11 +5,11 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AdviceStack;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.SpecificationInterfaceType;
import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.ejb3.proxy.handler.stateless.StatelessRemoteProxyInvocationHandler;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
import org.jboss.ejb3.session.ProxyAccessType;
import org.jboss.ejb3.session.SessionContainer;
import org.jboss.ejb3.session.SessionSpecContainer;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessClusterProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -27,15 +27,15 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AdviceStack;
import org.jboss.aspects.remoting.FamilyWrapper;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.SpecificationInterfaceType;
import org.jboss.ejb3.annotation.Clustered;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.annotation.defaults.ClusteredDefaults;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactoryRegistry;
import org.jboss.ejb3.proxy.handler.stateless.StatelessClusteredInvocationHandler;
import org.jboss.ejb3.remoting.LoadBalancePolicyNotRegisteredException;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
-import org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry;
import org.jboss.ejb3.session.SessionSpecContainer;
import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessLocalProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -25,9 +25,9 @@
import javax.ejb.LocalHome;
import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.SpecificationInterfaceType;
import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.proxy.handler.stateless.StatelessLocalProxyInvocationHandler;
import org.jboss.ejb3.session.ProxyAccessType;
import org.jboss.ejb3.session.SessionSpecContainer;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/factory/stateless/StatelessRemoteProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -26,10 +26,10 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AdviceStack;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.ejb3.proxy.handler.stateless.StatelessRemoteProxyInvocationHandler;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
import org.jboss.ejb3.session.SessionSpecContainer;
import org.jboss.logging.Logger;
import org.jboss.remoting.InvokerLocator;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -21,7 +21,6 @@
*/
package org.jboss.ejb3.proxy.handler;
-import org.jboss.ejb3.remoting.ProxyInvocationHandler;
/**
* BaseProxy
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/BaseProxyInvocationHandlerRemote.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,81 @@
+/*
+ * 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();
+}
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseProxyInvocationHandlerRemote.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/BaseSessionRemoteProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -34,7 +34,7 @@
* @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
* @version $Revision$
*/
-public abstract class BaseSessionRemoteProxyInvocationHandler extends org.jboss.ejb3.remoting.BaseProxyInvocationHandlerRemote
+public abstract class BaseSessionRemoteProxyInvocationHandler extends org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandlerRemote
{
private static final long serialVersionUID = 8310915813626447181L;
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandler.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyInvocationHandler.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandler.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,44 @@
+/*
+ * 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$
+ */
+public interface ProxyInvocationHandler
+{
+ /**
+ * For use in hashCode, toString() and equals() *
+ */
+ String toString();
+
+ Object getAsynchronousProxy(Object proxy);
+
+ String getBusinessInterfaceType();
+}
\ No newline at end of file
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/ProxyInvocationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java (from rev 72450, projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyInvocationHandler.java)
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java (rev 0)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -0,0 +1,35 @@
+/*
+ * 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 ProxyInvocationHandler
+{
+ SimpleMetaData getMetaData();
+}
Property changes on: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/RemoteProxyInvocationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceLocalProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceLocalProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceLocalProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -32,8 +32,8 @@
import org.jboss.aspects.asynch.FutureHolder;
import org.jboss.ejb3.Container;
import org.jboss.ejb3.LocalProxyInvocationHandler;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.proxy.JBossProxy;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.service.ServiceContainer;
/**
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceRemoteProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/service/ServiceRemoteProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -33,9 +33,9 @@
import org.jboss.aspects.asynch.AsynchProvider;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.ejb3.Container;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
import org.jboss.ejb3.proxy.JBossProxy;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.remoting.InvokerLocator;
@@ -43,7 +43,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
-public class ServiceRemoteProxyInvocationHandler extends org.jboss.ejb3.remoting.BaseProxyInvocationHandlerRemote
+public class ServiceRemoteProxyInvocationHandler extends org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandlerRemote
{
private static final long serialVersionUID = 306994045720155142L;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulClusteredInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulClusteredInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulClusteredInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -34,9 +34,9 @@
import org.jboss.aspects.remoting.FamilyWrapper;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.ejb3.Container;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
import org.jboss.ejb3.proxy.JBossProxy;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.ejb3.stateful.ForwardId;
@@ -52,7 +52,7 @@
* @author Brian Stansberry
* @version $Revision: 68144 $
*/
-public class StatefulClusteredInvocationHandler extends org.jboss.ejb3.remoting.BaseProxyInvocationHandlerRemote
+public class StatefulClusteredInvocationHandler extends org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandlerRemote
{
private static final long serialVersionUID = -1797802577940671292L;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulHomeRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulHomeRemoteProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulHomeRemoteProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -32,7 +32,7 @@
import org.jboss.aop.util.PayloadKey;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.ejb3.Container;
-import org.jboss.ejb3.ProxyUtils;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.ejb3.stateful.StatefulHandleRemoteImpl;
import org.jboss.ejb3.stateful.StatefulRemoteInvocation;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulLocalProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulLocalProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulLocalProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -36,7 +36,7 @@
import org.jboss.ejb3.Container;
import org.jboss.ejb3.Ejb3Registry;
import org.jboss.ejb3.LocalProxyInvocationHandler;
-import org.jboss.ejb3.ProxyUtils;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.session.SessionContainer;
/**
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulRemoteProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateful/StatefulRemoteProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -36,8 +36,8 @@
import org.jboss.aspects.asynch.AsynchProvider;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.ejb3.Container;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.ejb3.stateful.ForwardId;
import org.jboss.ejb3.stateful.StatefulConstants;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessClusteredInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessClusteredInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessClusteredInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -35,10 +35,10 @@
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.ejb3.Container;
import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
import org.jboss.ejb3.proxy.JBossProxy;
-import org.jboss.ejb3.remoting.BaseProxyInvocationHandlerRemote;
+import org.jboss.ejb3.proxy.ProxyUtils;
+import org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandlerRemote;
import org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessLocalProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessLocalProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessLocalProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -31,7 +31,7 @@
import org.jboss.aspects.asynch.FutureHolder;
import org.jboss.ejb3.Container;
import org.jboss.ejb3.LocalProxyInvocationHandler;
-import org.jboss.ejb3.ProxyUtils;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.logging.Logger;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessRemoteProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/proxy/handler/stateless/StatelessRemoteProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -33,8 +33,8 @@
import org.jboss.aspects.asynch.AsynchProvider;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.ejb3.Container;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
+import org.jboss.ejb3.proxy.ProxyUtils;
import org.jboss.ejb3.proxy.handler.BaseSessionRemoteProxyInvocationHandler;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.logging.Logger;
Deleted: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/BaseProxyInvocationHandlerRemote.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/BaseProxyInvocationHandlerRemote.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/BaseProxyInvocationHandlerRemote.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -1,82 +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.remoting;
-
-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;
-import org.jboss.ejb3.proxy.handler.BaseProxyInvocationHandler;
-
-/**
- * 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/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -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.remoting;
-
-/**
- * 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/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/ProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -1,44 +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.remoting;
-
-/**
- * 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$
- */
-public interface ProxyInvocationHandler
-{
- /**
- * For use in hashCode, toString() and equals() *
- */
- String toString();
-
- Object getAsynchronousProxy(Object proxy);
-
- String getBusinessInterfaceType();
-}
\ No newline at end of file
Deleted: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -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.remoting;
-
-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);
-}
Deleted: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -1,104 +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.remoting;
-
-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: $
- */
-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
- *
- * @param name The registered name of the proxy factory to retrieve
- * @return The Proxy Factory
- */
- 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/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyInvocationHandler.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/remoting/RemoteProxyInvocationHandler.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -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.remoting;
-
-import org.jboss.aop.metadata.SimpleMetaData;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public interface RemoteProxyInvocationHandler extends ProxyInvocationHandler
-{
- SimpleMetaData getMetaData();
-}
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -57,10 +57,10 @@
import org.jboss.ejb3.annotation.Service;
import org.jboss.ejb3.asynchronous.AsynchronousInterceptor;
import org.jboss.ejb3.proxy.ProxyFactory;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.ejb3.proxy.factory.SessionProxyFactory;
import org.jboss.ejb3.proxy.factory.service.ServiceLocalProxyFactory;
import org.jboss.ejb3.proxy.factory.service.ServiceRemoteProxyFactory;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
import org.jboss.ejb3.session.SessionContainer;
import org.jboss.ejb3.timerservice.TimedObjectInvoker;
import org.jboss.ejb3.timerservice.TimerServiceFactory;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -28,7 +28,6 @@
import java.util.List;
import java.util.Map;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.LocalBinding;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.annotation.RemoteBindings;
@@ -37,7 +36,8 @@
import org.jboss.ejb3.annotation.impl.RemoteBindingImpl;
import org.jboss.ejb3.annotation.impl.RemoteBindingsImpl;
import org.jboss.ejb3.proxy.ProxyFactory;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.logging.Logger;
/**
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -46,16 +46,16 @@
import org.jboss.ejb3.EJBContainerInvocation;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.ejb3.Ejb3Module;
-import org.jboss.ejb3.ProxyFactoryHelper;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.ThreadLocalStack;
import org.jboss.ejb3.annotation.LocalBinding;
import org.jboss.ejb3.annotation.RemoteBinding;
import org.jboss.ejb3.annotation.RemoteBindings;
import org.jboss.ejb3.proxy.ProxyFactory;
+import org.jboss.ejb3.proxy.ProxyUtils;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
+import org.jboss.ejb3.proxy.factory.RemoteProxyFactory;
import org.jboss.ejb3.proxy.factory.SessionProxyFactory;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
import org.jboss.ejb3.stateful.StatefulContainerInvocation;
import org.jboss.ha.framework.server.HATarget;
import org.jboss.logging.Logger;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -57,8 +57,6 @@
import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.EJBContainerInvocation;
import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.ProxyFactoryHelper;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.annotation.Cache;
import org.jboss.ejb3.annotation.Clustered;
import org.jboss.ejb3.annotation.LocalBinding;
@@ -72,6 +70,8 @@
import org.jboss.ejb3.interceptors.aop.InterceptorsFactory;
import org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor;
import org.jboss.ejb3.proxy.ProxyFactory;
+import org.jboss.ejb3.proxy.ProxyUtils;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.proxy.factory.SessionProxyFactory;
import org.jboss.ejb3.proxy.factory.stateful.BaseStatefulRemoteProxyFactory;
import org.jboss.ejb3.proxy.factory.stateful.StatefulClusterProxyFactory;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -31,9 +31,9 @@
import javax.naming.NamingException;
import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.SpecificationInterfaceType;
import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.proxy.factory.stateful.BaseStatefulProxyFactory;
import org.jboss.ejb3.proxy.handler.stateful.StatefulLocalHomeProxyInvocationHandler;
import org.jboss.ejb3.proxy.handler.stateful.StatefulLocalProxyInvocationHandler;
Modified: projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
===================================================================
--- projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java 2008-04-21 21:11:38 UTC (rev 72522)
+++ projects/ejb3/dev/ejbthree1269/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java 2008-04-21 21:13:11 UTC (rev 72523)
@@ -45,11 +45,11 @@
import org.jboss.ejb3.BeanContextLifecycleCallback;
import org.jboss.ejb3.EJBContainerInvocation;
import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.ProxyFactoryHelper;
-import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.annotation.Clustered;
import org.jboss.ejb3.annotation.LocalBinding;
import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.proxy.ProxyUtils;
+import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
import org.jboss.ejb3.proxy.factory.SessionProxyFactory;
import org.jboss.ejb3.proxy.factory.stateful.StatefulProxyFactory;
import org.jboss.ejb3.proxy.factory.stateless.BaseStatelessRemoteProxyFactory;
More information about the jboss-cvs-commits
mailing list