[jboss-cvs] JBossAS SVN: r93149 - projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 3 02:38:46 EDT 2009
Author: ALRubinger
Date: 2009-09-03 02:38:46 -0400 (Thu, 03 Sep 2009)
New Revision: 93149
Modified:
projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java
Log:
[EJBTHREE-1909] Remove the cache, we will hack this somewhere else in a CL
Modified: projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java
===================================================================
--- projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java 2009-09-03 02:42:54 UTC (rev 93148)
+++ projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java 2009-09-03 06:38:46 UTC (rev 93149)
@@ -26,8 +26,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
import org.jboss.ejb3.common.classloader.PrimitiveAwareClassLoader;
import org.jboss.logging.Logger;
@@ -82,13 +80,6 @@
*/
private String[] argumentTypes;
- /**
- * Cache of methods to a proposed ClassLoader. Used to
- * limit the underlying ClassLoader calls in {@link SerializableMethod#toMethod(ClassLoader)}.
- * Must be a Thread-safe impl
- */
- private transient Map<ClassLoader, Method> methodCache;
-
// ------------------------------------------------------------------------------||
// Constructors -----------------------------------------------------------------||
// ------------------------------------------------------------------------------||
@@ -238,23 +229,6 @@
*/
public Method toMethod(ClassLoader cl)
{
- // Get Cache
- Map<ClassLoader, Method> cache = this.getMethodCache();
- if (cache == null)
- {
- this.setMethodCache(new ConcurrentHashMap<ClassLoader, Method>());
- cache = this.getMethodCache();
- }
-
- // Obtain from cache
- final Method method = cache.get(cl);
-
- // If found, return it
- if (method != null)
- {
- return method;
- }
-
// Load the Class described by the Method
Class<?> invokingClass = this.getClassType(cl);
@@ -280,9 +254,6 @@
throw new RuntimeException("Method " + this + " does not exist in " + invokingClass.getName(), nsme);
}
- // Add method to the cache
- cache.put(cl, invokedMethod);
-
// Return
return invokedMethod;
}
@@ -325,6 +296,7 @@
{
// Perform assertions
assert cl != null : ClassLoader.class.getSimpleName() + " must be defined.";
+
// Load the Class described by the Method
Class<?> clazz = null;
@@ -407,20 +379,4 @@
this.actualClassName = actualClassName;
}
- /**
- * @return the methodCache
- */
- private Map<ClassLoader, Method> getMethodCache()
- {
- return methodCache;
- }
-
- /**
- * @param methodCache the methodCache to set
- */
- private void setMethodCache(Map<ClassLoader, Method> methodCache)
- {
- this.methodCache = methodCache;
- }
-
}
More information about the jboss-cvs-commits
mailing list