geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r427826 - /geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
Date Wed, 02 Aug 2006 00:46:10 GMT
Author: kevan
Date: Tue Aug  1 17:46:09 2006
New Revision: 427826

URL: http://svn.apache.org/viewvc?rev=427826&view=rev
Log:
GERONIMO-2204 I'm reverting the original change associated with this Jira. It's causing OutOfMemoryErrors
on deploy/undeploy of apps.

Modified:
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java?rev=427826&r1=427825&r2=427826&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
(original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
Tue Aug  1 17:46:09 2006
@@ -17,7 +17,6 @@
 package org.apache.geronimo.kernel.basic;
 
 import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -27,8 +26,6 @@
 import net.sf.cglib.proxy.Callback;
 import net.sf.cglib.proxy.Enhancer;
 import net.sf.cglib.proxy.MethodInterceptor;
-import net.sf.cglib.proxy.NoOp;
-import net.sf.cglib.proxy.CallbackFilter;
 import net.sf.cglib.reflect.FastClass;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -200,8 +197,7 @@
                 }
             }
             enhancer.setClassLoader(classLoader);
-            enhancer.setCallbackFilter(new FinalizeCallbackFilter());
-            enhancer.setCallbackTypes(new Class[] {NoOp.class, MethodInterceptor.class});
+            enhancer.setCallbackType(MethodInterceptor.class);
             enhancer.setUseFactory(false);
             proxyType = enhancer.createClass();
             fastClass = FastClass.create(proxyType);
@@ -212,7 +208,7 @@
 
             Callback callback = getMethodInterceptor(proxyType, kernel, target);
 
-            Enhancer.registerCallbacks(proxyType, new Callback[]{NoOp.INSTANCE, callback});
+            Enhancer.registerCallbacks(proxyType, new Callback[]{callback});
             try {
                 Object proxy = fastClass.newInstance();
                 interceptors.put(proxy, callback);
@@ -229,16 +225,6 @@
                   throw new ProxyCreationException(e);
                 }
             }
-        }
-    }
-
-    private static class FinalizeCallbackFilter implements CallbackFilter {
-
-        public int accept(Method method) {
-            if (method.getName().equals("finalize") && method.getParameterTypes().length
== 0) {
-                return 0;
-            }
-            return 1;
         }
     }
 



Mime
View raw message