maguro 2005/04/19 01:02:01
Modified: modules/core/src/java/org/openejb/client
EJBObjectHandler.java
Log:
A better way to check to see if business methods are applicable.
Revision Changes Path
1.5 +6 -6
openejb/modules/core/src/java/org/openejb/client/EJBObjectHandler.java
Index: EJBObjectHandler.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/client/EJBObjectHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EJBObjectHandler.java 30 Jul 2004 19:03:44 -0000 1.4
+++ EJBObjectHandler.java 19 Apr 2005 05:02:01 -0000 1.5
@@ -44,21 +44,20 @@
*/
package org.openejb.client;
+import javax.ejb.EJBObject;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
-import javax.ejb.EJBObject;
-
-import org.openejb.EJBComponentType;
import org.apache.geronimo.security.ContextManager;
+import org.openejb.EJBComponentType;
+
/**
* @since 11/25/2001
*/
public abstract class EJBObjectHandler extends EJBInvocationHandler {
-
protected static final Method GETEJBHOME = getMethod(EJBObject.class,
"getEJBHome", null);
protected static final Method GETHANDLE = getMethod(EJBObject.class,
"getHandle", null);
protected static final Method GETPRIMARYKEY = getMethod(EJBObject.class,
"getPrimaryKey", null);
@@ -155,6 +154,7 @@
try {
String methodName = m.getName();
+
if (m.getDeclaringClass() == Object.class) {
if (m.equals(TOSTRING)) {
return "proxy=" + this;
@@ -192,7 +192,7 @@
} else {
throw new UnsupportedOperationException("Unkown method:
" + m);
}
- } else if (m.getDeclaringClass() == ejb.remoteClass) {
+ } else if
(m.getDeclaringClass().isAssignableFrom(ejb.remoteClass)) {
retValue = businessMethod(m, a, p);
} else {
throw new UnsupportedOperationException("Unkown method: " +
m);