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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jan 26 09:18:14 EST 2007


Author: dimitris at jboss.org
Date: 2007-01-26 09:18:14 -0500 (Fri, 26 Jan 2007)
New Revision: 60021

Modified:
   branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java
Log:
JBAS-3732 - remove classloader.equals optimization

Modified: branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java	2007-01-26 13:51:38 UTC (rev 60020)
+++ branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java	2007-01-26 14:18:14 UTC (rev 60021)
@@ -88,6 +88,7 @@
 import org.jboss.util.naming.Util;
 import org.jboss.webservice.WebServiceClientHandler;
 import org.omg.CORBA.ORB;
+
 /**
  * This is the base class for all EJB-containers in JBoss. A Container
  * functions as the central hub of all metadata and plugins. Through this
@@ -108,6 +109,7 @@
  * @author <a href="bill at burkecentral.com">Bill Burke</a>
  * @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
  * @author <a href="mailto:christoph.jung at infor.de">Christoph G. Jung</a>
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
  * @version $Revision$
  *
  * @jmx.mbean extends="org.jboss.system.ServiceMBean"
@@ -898,16 +900,12 @@
       long start = System.currentTimeMillis();
       Method m = null;
 
-      boolean setCl = false;
       Object type = null;
       String contextID = getJaccContextID();
       try
       {
-         if (!this.classLoader.equals(callerClassLoader))
-         {
-            setCl = true;
-            SecurityActions.setContextClassLoader(this.classLoader);
-         }
+         // JBAS-3732 - Remove classloader.equals optimization
+         SecurityActions.setContextClassLoader(this.classLoader);
 
          // Set the JACC context id
          mi.setValue(InvocationKey.JACC_CONTEXT_ID, contextID);
@@ -1017,10 +1015,8 @@
          this.invokeStats.callOut();
 
          // Restore the incoming class loader
-         if (setCl)
-         {
-            SecurityActions.setContextClassLoader(callerClassLoader);
-         }
+         SecurityActions.setContextClassLoader(callerClassLoader);
+         
          // Restore the incoming context id
          contextID = SecurityActions.setContextID(contextID);
 




More information about the jboss-cvs-commits mailing list