[jboss-cvs] JBossAS SVN: r60024 - trunk/server/src/main/org/jboss/ejb.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 26 10:30:49 EST 2007
Author: dimitris at jboss.org
Date: 2007-01-26 10:30:48 -0500 (Fri, 26 Jan 2007)
New Revision: 60024
Modified:
trunk/server/src/main/org/jboss/ejb/Container.java
Log:
JBAS-3732 - Remove classloader.equals optimization
Modified: trunk/server/src/main/org/jboss/ejb/Container.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/Container.java 2007-01-26 14:36:09 UTC (rev 60023)
+++ trunk/server/src/main/org/jboss/ejb/Container.java 2007-01-26 15:30:48 UTC (rev 60024)
@@ -1,8 +1,8 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
@@ -110,6 +110,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"
@@ -126,6 +127,7 @@
ObjectNameFactory.create(BASE_EJB_CONTAINER_NAME + ",*");
protected static final Method EJBOBJECT_REMOVE;
+
/** A reference to {@link javax.ejb.TimedObject#ejbTimeout}. */
protected static final Method EJB_TIMEOUT;
@@ -175,9 +177,7 @@
/** This is the SecurityManager */
protected AuthenticationManager sm;
- /**
- * Authorization Manager
- */
+ /** Authorization Manager */
protected AuthorizationManager authorizationManager;
/** This is the realm mapping */
@@ -201,8 +201,10 @@
/** ObjectName of Container */
private ObjectName jmxName;
+
/** HashMap<String, EJBProxyFactory> for the invoker bindings */
protected HashMap proxyFactories = new HashMap();
+
/** A priviledged actions for MBeanServer.invoke when running with sec mgr */
private MBeanServerAction serverAction = new MBeanServerAction();
@@ -214,8 +216,10 @@
/** The number of create invocations that have been made */
protected long createCount;
+
/** The number of create invocations that have been made */
protected long removeCount;
+
/** Time statistics for the invoke(Invocation) methods */
protected InvocationStatistics invokeStats = new InvocationStatistics();
@@ -293,7 +297,7 @@
/**
* Returns this container's transaction manager.
*
- * @return A concrete instance of javax.transaction.TransactionManager
+ * @return A concrete instance of javax.transaction.TransactionManager
*/
public TransactionManager getTransactionManager()
{
@@ -416,6 +420,7 @@
{
return di;
}
+
public final void setDeploymentUnit(DeploymentUnit di)
{
this.di = di;
@@ -436,6 +441,7 @@
{
return jaccContextID;
}
+
public void setJaccContextID(String id)
{
jaccContextID = id;
@@ -673,6 +679,7 @@
return codebase;
}
*/
+
/** Build a JMX name using the pattern jboss.j2ee:service=EJB,jndiName=[jndiName]
where the [jndiName] is either the bean remote home JNDI binding, or
the local home JNDI binding if the bean has no remote interfaces.
@@ -892,16 +899,14 @@
*
* @throws Exception
*/
- public abstract Object internalInvokeHome(Invocation mi)
- throws Exception;
+ public abstract Object internalInvokeHome(Invocation mi) throws Exception;
/**
* This method is called when a method call comes
* in on an EJBObject. The Container forwards this call to the interceptor
* chain for further processing.
*/
- public abstract Object internalInvoke(Invocation mi)
- throws Exception;
+ public abstract Object internalInvoke(Invocation mi) throws Exception;
abstract Interceptor createContainerInterceptor();
@@ -915,24 +920,20 @@
* @return the value of the ejb invocation
* @throws Exception on error
*/
- public Object invoke(Invocation mi)
- throws Exception
+ public Object invoke(Invocation mi) throws Exception
{
ClassLoader callerClassLoader = SecurityActions.getContextClassLoader();
long start = System.currentTimeMillis();
Method m = null;
- boolean setCl = false;
Object type = null;
String contextID = getJaccContextID();
try
{
pushENC();
- 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);
@@ -1046,10 +1047,8 @@
popENC();
// 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