[jboss-cvs] JBossAS SVN: r79060 - branches/Branch_4_2/server/src/main/org/jboss/ejb/plugins.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 3 06:14:09 EDT 2008


Author: darran.lofthouse at jboss.com
Date: 2008-10-03 06:14:08 -0400 (Fri, 03 Oct 2008)
New Revision: 79060

Modified:
   branches/Branch_4_2/server/src/main/org/jboss/ejb/plugins/StatefulSessionSecurityInterceptor.java
Log:
[JBWS-6006] Incorrect CallerPrincipal used for ejbCreate method of Stateful Session Bean. 

Additional fix for call to javax.ejb.Handle.getEJBObject();


Modified: branches/Branch_4_2/server/src/main/org/jboss/ejb/plugins/StatefulSessionSecurityInterceptor.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/ejb/plugins/StatefulSessionSecurityInterceptor.java	2008-10-03 10:09:02 UTC (rev 79059)
+++ branches/Branch_4_2/server/src/main/org/jboss/ejb/plugins/StatefulSessionSecurityInterceptor.java	2008-10-03 10:14:08 UTC (rev 79060)
@@ -21,7 +21,10 @@
   */
 package org.jboss.ejb.plugins;
 
+import java.lang.reflect.Method;
+
 import javax.ejb.EJBObject;
+import javax.ejb.Handle;
 
 import org.jboss.ejb.Container;
 import org.jboss.ejb.EnterpriseContext;
@@ -82,8 +85,10 @@
 
    public Object invokeHome(Invocation mi) throws Exception
    {
+      Method getEJBObject = Handle.class.getMethod("getEJBObject", new Class[0]);
+      
       //Invocation on the handle, we don't need a bean instance
-      if (EJBObject.class.getMethod("getEJBHome", new Class[0]).equals(mi.getMethod()))
+      if (getEJBObject.equals(mi.getMethod()))
          return getNext().invokeHome(mi);
 
       EnterpriseContext ctx = (EnterpriseContext) mi.getEnterpriseContext();




More information about the jboss-cvs-commits mailing list