commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r265557 - in /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist: JavassistMethodInvocation.java JavassistProxyFactory.java
Date Wed, 31 Aug 2005 19:18:16 GMT
Author: jcarman
Date: Wed Aug 31 12:18:10 2005
New Revision: 265557

URL: http://svn.apache.org/viewcvs?rev=265557&view=rev
Log:
Changed cache implementations to simple HashMaps (will require more analysis to make sure
there is no memory leak problem).

Modified:
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java?rev=265557&r1=265556&r2=265557&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java
(original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java
Wed Aug 31 12:18:10 2005
@@ -24,12 +24,13 @@
 
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Method;
-import java.util.WeakHashMap;
-import java.util.Set;
+import java.util.Arrays;
 import java.util.HashSet;
-import java.util.List;
 import java.util.LinkedList;
-import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import java.util.WeakHashMap;
+import java.util.HashMap;
 
 /**
  * @author James Carman
@@ -37,6 +38,9 @@
  */
 public abstract class JavassistMethodInvocation implements MethodInvocation
 {
+    // TODO: Make sure this doesn't cause memory leaks in application servers!
+    private static final HashMap invocationClassCache = new HashMap();
+
     protected final Method method;
     protected final Object target;
     protected final Object[] arguments;
@@ -68,7 +72,7 @@
         return method;
     }
 
-    private static final WeakHashMap invocationClassCache = new WeakHashMap();
+
 
     public synchronized static Class getMethodInvocationClass( ClassLoader classLoader, Method
interfaceMethod )
             throws CannotCompileException

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java?rev=265557&r1=265556&r2=265557&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
(original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
Wed Aug 31 12:18:10 2005
@@ -40,7 +40,9 @@
  */
 public class JavassistProxyFactory extends AbstractProxyFactory
 {
+    // TODO: Make sure this doesn't cause memory leaks in application servers!
     private static HashMap<ProxyClassDescriptor, Class> delegatingProxyClassCache =
new HashMap<ProxyClassDescriptor, Class>();
+    // TODO: Make sure this doesn't cause memory leaks in application servers!
     private static HashMap<ProxyClassDescriptor, Class> interceptingProxyClassCache
= new HashMap<ProxyClassDescriptor, Class>();
 
     public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor
interceptor,



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message