geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service GeronimoMBeanEndpointConnection.java
Date Fri, 14 Nov 2003 02:36:44 GMT
dain        2003/11/13 18:36:44

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/service
                        GeronimoMBeanEndpointConnection.java
  Log:
  Changed proxy to ignore static methods
  
  Revision  Changes    Path
  1.3       +10 -3     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBeanEndpointConnection.java
  
  Index: GeronimoMBeanEndpointConnection.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBeanEndpointConnection.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GeronimoMBeanEndpointConnection.java	9 Nov 2003 20:01:12 -0000	1.2
  +++ GeronimoMBeanEndpointConnection.java	14 Nov 2003 02:36:44 -0000	1.3
  @@ -63,13 +63,13 @@
   
   import org.apache.geronimo.kernel.jmx.InvokeMBean;
   
  +import net.sf.cglib.proxy.CallbackFilter;
   import net.sf.cglib.proxy.Callbacks;
   import net.sf.cglib.proxy.Enhancer;
   import net.sf.cglib.proxy.Factory;
   import net.sf.cglib.proxy.MethodInterceptor;
   import net.sf.cglib.proxy.MethodProxy;
   import net.sf.cglib.proxy.SimpleCallbacks;
  -import net.sf.cglib.proxy.SimpleFilter;
   import net.sf.cglib.reflect.FastClass;
   
   /**
  @@ -144,7 +144,14 @@
           // get the factory
           Enhancer enhancer = new Enhancer();
           enhancer.setSuperclass(iface);
  -        enhancer.setCallbackFilter(new SimpleFilter(Callbacks.INTERCEPT));
  +        enhancer.setCallbackFilter(new CallbackFilter() {
  +            public int accept(Method method) {
  +                if(Modifier.isStatic(method.getModifiers())) {
  +                    return Callbacks.NO_OP;
  +                }
  +                return Callbacks.INTERCEPT;
  +            }
  +        });
           enhancer.setCallbacks(new SimpleCallbacks());
           factory = enhancer.create();
   
  
  
  

Mime
View raw message