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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 3 07:13:48 EDT 2008


Author: darran.lofthouse at jboss.com
Date: 2008-10-03 07:13:48 -0400 (Fri, 03 Oct 2008)
New Revision: 79066

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

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



Modified: branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/plugins/StatefulSessionSecurityInterceptor.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/plugins/StatefulSessionSecurityInterceptor.java	2008-10-03 11:05:34 UTC (rev 79065)
+++ branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/plugins/StatefulSessionSecurityInterceptor.java	2008-10-03 11:13:48 UTC (rev 79066)
@@ -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