[jboss-cvs] JBossAS SVN: r65844 - in branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3: stateful and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 4 11:36:27 EDT 2007
Author: ALRubinger
Date: 2007-10-04 11:36:27 -0400 (Thu, 04 Oct 2007)
New Revision: 65844
Modified:
branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java
branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
Log:
EJBTHREE-786: Cleaned up Implementation
Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java 2007-10-04 15:09:59 UTC (rev 65843)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java 2007-10-04 15:36:27 UTC (rev 65844)
@@ -232,56 +232,7 @@
return getBusinessInterfaces(beanClass.getSuperclass(), interfaces);
}
}
-
- /**
- * Returns whether or not the specified business interface is a
- * direct or indirect subclass of EJBObject
- *
- * @param businessInterface
- * @return
- */
- public static boolean isSubclassOfEjbObject(Class<?> businessInterface)
- {
- return ProxyFactoryHelper.isSubclassOfEjbObject(businessInterface,false);
- }
-
- /**
- * Returns whether or not the specified business interface is a
- * direct or indirect subclass of EJBLocalObject
- *
- * @param businessInterface
- * @return
- */
- public static boolean isSubclassOfEjbLocalObject(Class<?> businessInterface)
- {
- return ProxyFactoryHelper.isSubclassOfEjbObject(businessInterface,true);
- }
-
- private static boolean isSubclassOfEjbObject(Class<?> businessInterface, boolean local)
- {
- // Define EJBObject or EJBLocalObject
- Class<?> testClass = local ? EJBLocalObject.class : EJBObject.class;
- // Test interface
- if (businessInterface.equals(testClass))
- {
- return true;
- }
-
- // Loop through all super interfaces
- for (Class<?> superInterface : businessInterface.getInterfaces())
- {
- // Test all super interfaces
- if (ProxyFactoryHelper.isSubclassOfEjbObject(superInterface, local))
- {
- return true;
- }
- }
-
- // Not found
- return false;
- }
-
public static Class getLocalHomeInterface(Container container)
{
Class beanClass = container.getBeanClass();
Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2007-10-04 15:09:59 UTC (rev 65843)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2007-10-04 15:36:27 UTC (rev 65844)
@@ -69,35 +69,9 @@
// Obtain all local interfaces
List<Class<?>> localInterfaces = new ArrayList<Class<?>>();
localInterfaces.addAll(Arrays.asList(ProxyFactoryHelper.getLocalInterfaces(statefulContainer)));
-
- // Loop through all interfaces, checking for EJBLocalObject
- boolean addEJBLocalObject = false;
- for (Class<?> clazz : localInterfaces)
- {
- // If a subclass of EJBObject, set flag to add
- if (ProxyFactoryHelper.isSubclassOfEjbLocalObject(clazz))
- {
- addEJBLocalObject = true;
- }
- }
- if (addEJBLocalObject)
- {
- // Add EJBLocalObject
- localInterfaces.add(EJBLocalObject.class);
- }
// Add JBossProxy
localInterfaces.add(JBossProxy.class);
-
- // Loop through all interfaces
- for (Class<?> clazz : localInterfaces)
- {
- // If a subclass of EJBLocalObject, add
- if (ProxyFactoryHelper.isSubclassOfEjbLocalObject(clazz))
- {
- localInterfaces.add(EJBLocalObject.class);
- }
- }
// If binding along w/ home, add home
if (bindTogether)
Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-10-04 15:09:59 UTC (rev 65843)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-10-04 15:36:27 UTC (rev 65844)
@@ -82,25 +82,8 @@
// Obtain all remote interfaces
List<Class<?>> remoteInterfaces = new ArrayList<Class<?>>();
- remoteInterfaces.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteInterfaces(statefulContainer)));
-
- // Loop through all interfaces, checking for EJBObject
- boolean addEJBObject = false;
- for (Class<?> clazz : remoteInterfaces)
- {
- // If a subclass of EJBObject, set flag to add
- if (ProxyFactoryHelper.isSubclassOfEjbObject(clazz))
- {
- addEJBObject = true;
- }
- }
- if (addEJBObject)
- {
- // Add EJBObject
- remoteInterfaces.add(EJBObject.class);
+ remoteInterfaces.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteInterfaces(statefulContainer)));
- }
-
// Add JBossProxy
remoteInterfaces.add(JBossProxy.class);
Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-10-04 15:09:59 UTC (rev 65843)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-10-04 15:36:27 UTC (rev 65844)
@@ -26,6 +26,7 @@
import java.util.List;
import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
import javax.ejb.LocalHome;
import org.jboss.annotation.ejb.LocalBinding;
@@ -64,22 +65,6 @@
// Ensure remote interfaces defined
if (localInterfaces.size() > 0)
{
- // Loop through all interfaces, checking for EJBLocalObject
- boolean addEJBLocalObject = false;
- for (Class<?> clazz : localInterfaces)
- {
- // If a subclass of EJBObject, set flag to add
- if (ProxyFactoryHelper.isSubclassOfEjbLocalObject(clazz))
- {
- addEJBLocalObject = true;
- }
- }
- if (addEJBLocalObject)
- {
- // Add EJBLocalObject
- localInterfaces.add(EJBLocalObject.class);
- }
-
// Add JBossProxy
localInterfaces.add(JBossProxy.class);
Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-10-04 15:09:59 UTC (rev 65843)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-10-04 15:36:27 UTC (rev 65844)
@@ -78,22 +78,6 @@
// Ensure remote interfaces defined
if (remoteInterfaces.size() > 0)
{
- // Loop through all interfaces, checking for EJBObject
- boolean addEJBObject = false;
- for (Class<?> clazz : remoteInterfaces)
- {
- // If a subclass of EJBObject, set flag to add
- if (ProxyFactoryHelper.isSubclassOfEjbObject(clazz))
- {
- addEJBObject = true;
- }
- }
- if (addEJBObject)
- {
- // Add EJBObject
- remoteInterfaces.add(EJBObject.class);
- }
-
// Add JBossProxy
remoteInterfaces.add(JBossProxy.class);
More information about the jboss-cvs-commits
mailing list