openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1438425 - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/component/ main/java/org/apache/webbeans/intercept/ main/java/org/apache/webbeans/portable/ main/java/org/apache/webbeans/proxy/ test/java/org/apache/webbean...
Date Fri, 25 Jan 2013 10:27:15 GMT
Author: struberg
Date: Fri Jan 25 10:27:14 2013
New Revision: 1438425

URL: http://svn.apache.org/viewvc?rev=1438425&view=rev
Log:
OWB-769 add serialisation support for InterceptorDecorator proxies

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/DefaultInterceptorHandler.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/NewProxyTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/factory/InterceptorDecoratorProxyFactoryTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/resolution/InterceptorProxyChainTest.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
Fri Jan 25 10:27:14 2013
@@ -153,12 +153,13 @@ public abstract class InjectionTargetBea
                 Method[] businessMethods = methodInterceptors.keySet().toArray(new Method[methodInterceptors.size()]);
                 Method[] nonInterceptedMethods = interceptorInfo.getNonInterceptedMethods().toArray(new
Method[interceptorInfo.getNonInterceptedMethods().size()]);
 
-                proxyClass = (Class<? extends T>) pf.createProxyClass(classLoader,
getReturnType(), businessMethods, nonInterceptedMethods);
+                proxyClass = (Class<? extends T>) pf.createProxyClass(this, classLoader,
getReturnType(), businessMethods, nonInterceptedMethods);
 
                 // now we collect the post-construct and pre-destroy interceptors
 
             }
-            injectionTarget.setInterceptorInfo(interceptorInfo, proxyClass, methodInterceptors,
postConstructInterceptors, preDestroyInterceptors);
+
+            injectionTarget.setInterceptorInfo(interceptorInfo, proxyClass, methodInterceptors,
postConstructInterceptors, preDestroyInterceptors, getId());
 
         }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/DefaultInterceptorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/DefaultInterceptorHandler.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/DefaultInterceptorHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/DefaultInterceptorHandler.java
Fri Jan 25 10:27:14 2013
@@ -18,13 +18,17 @@
  */
 package org.apache.webbeans.intercept;
 
+import java.io.ObjectStreamException;
 import java.lang.reflect.Method;
 import java.util.List;
 import java.util.Map;
 
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.InterceptionType;
 import javax.enterprise.inject.spi.Interceptor;
 
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.proxy.InterceptorHandler;
 import org.apache.webbeans.util.ExceptionUtil;
 
@@ -44,18 +48,37 @@ public class DefaultInterceptorHandler<T
      */
     private T delegate;
 
+    /**
+     * The passivation if in case this is a
+     * {@link javax.enterprise.inject.spi.PassivationCapable} bean.
+     * we just keep this field for serializing it away
+     */
+    private String beanPassivationId;
+
+
     private Map<Method, List<Interceptor<?>>> interceptors;
     private Map<Interceptor<?>, ?> instances;
 
+    /**
+     * InterceptorHandler wich gets used in our InjectionTargets which
+     * support interceptors and decorators
+     * @param target the decorated and intercepted instance. Needed for delivering Events
to private methods, etc.
+     * @param delegate the outermost Decorator or the intercepted instance
+     * @param interceptors Map with all active interceptors for each method.
+     * @param instances the Interceptor instances
+     * @param beanPassivationId passivationId if a Bean is {@link javax.enterprise.inject.spi.PassivationCapable}
+     */
     public DefaultInterceptorHandler(T target,
                                      T delegate,
                                      Map<Method, List<Interceptor<?>>>
interceptors,
-                                     Map<Interceptor<?>, ?> instances)
+                                     Map<Interceptor<?>, ?> instances,
+                                     String beanPassivationId)
     {
         this.target = target;
         this.delegate = delegate;
         this.instances = instances;
         this.interceptors = interceptors;
+        this.beanPassivationId = beanPassivationId;
     }
 
     public T getTarget()
@@ -94,4 +117,24 @@ public class DefaultInterceptorHandler<T
             return ExceptionUtil.throwAsRuntimeException(e);
         }
     }
+
+    /**
+     * The following code gets generated into the proxy:
+     *
+     * <pre>
+     * Object writeReplace() throws ObjectStreamException
+     * {
+     *     return provider;
+     * }
+     * </pre>
+     */
+    Object readResolve() throws ObjectStreamException
+    {
+        WebBeansContext webBeansContext = WebBeansContext.getInstance();
+        BeanManager beanManager = webBeansContext.getBeanManagerImpl();
+        Bean<?> bean = beanManager.getPassivationCapableBean(beanPassivationId);
+
+        return webBeansContext.getInterceptorDecoratorProxyFactory().getCachedProxyClass(bean);
+    }
+
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
Fri Jan 25 10:27:14 2013
@@ -48,7 +48,10 @@ public class NormalScopedBeanInterceptor
     private transient BeanManager beanManager;
     protected transient Bean<?> bean;
 
-    // we just keep this field for serializing it away
+    /**
+     * The passivation if in case this is a {@link PassivationCapable} bean.
+     * we just keep this field for serializing it away
+     */
     private String beanPassivationId;
 
     public NormalScopedBeanInterceptorHandler(BeanManager beanManager, Bean<?> bean)

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
Fri Jan 25 10:27:14 2013
@@ -108,6 +108,13 @@ public class InjectionTargetImpl<T> exte
     private BeanInterceptorInfo interceptorInfo = null;
 
     /**
+     * The passivationId of the bean this InjectionTarget serves.
+     * We need this to restore the interceptor proxy on de-serialisation.
+     * Only needed for Beans which are {@link javax.enterprise.inject.spi.PassivationCapable}.
+     */
+    private String beanPassivationId = null;
+
+    /**
      * Defines the interceptor/decorator stack for the InjectionTargetBean.
      * In case this is already defined, we get the ProxyClass for the Bean
      * or <code>null</code> if this Bean doesn't need any proxy.
@@ -142,13 +149,14 @@ public class InjectionTargetImpl<T> exte
     }
 
     public void setInterceptorInfo(BeanInterceptorInfo interceptorInfo, Class<? extends
T> proxyClass, Map<Method, List<Interceptor<?>>> methodInterceptors,
-                                   List<Interceptor<?>> postConstructInterceptors,
List<Interceptor<?>> preDestroyInterceptors)
+                                   List<Interceptor<?>> postConstructInterceptors,
List<Interceptor<?>> preDestroyInterceptors, String beanPassivationId)
     {
         this.interceptorInfo = interceptorInfo;
         this.proxyClass = proxyClass;
         this.methodInterceptors = methodInterceptors;
         this.postConstructInterceptors = postConstructInterceptors;
         this.preDestroyInterceptors = preDestroyInterceptors;
+        this.beanPassivationId = beanPassivationId;
     }
 
     /**
@@ -210,7 +218,7 @@ public class InjectionTargetImpl<T> exte
                     delegate = pf.createProxyInstance(proxyClass, instance, new DecoratorHandler(interceptorInfo,
instances, i - 1, instance));
                 }
             }
-            InterceptorHandler interceptorHandler = new DefaultInterceptorHandler<T>(instance,
delegate, methodInterceptors, interceptorInstances);
+            InterceptorHandler interceptorHandler = new DefaultInterceptorHandler<T>(instance,
delegate, methodInterceptors, interceptorInstances, beanPassivationId);
 
             T proxyInstance = pf.createProxyInstance(proxyClass, instance, interceptorHandler);
             instance = proxyInstance;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java
Fri Jan 25 10:27:14 2013
@@ -176,6 +176,7 @@ public abstract class AbstractProxyFacto
 
         Class<T> clazz = defineAndLoadClass(classLoader, proxyClassName, proxyBytes);
 
+
         return clazz;
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
Fri Jan 25 10:27:14 2013
@@ -19,10 +19,13 @@
 package org.apache.webbeans.proxy;
 
 
+import javax.enterprise.inject.spi.Bean;
+import java.io.ObjectStreamException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
@@ -57,8 +60,11 @@ public class InterceptorDecoratorProxyFa
     /** the name of the field which stores the Method[] of all intercepted methods */
     public static final String FIELD_INTERCEPTED_METHODS = "owbIntDecMethods";
 
-    //X TODO add caching of created proxy classes. This is needed to prevent class loading
clashes.
-    //X a generated proxy cannot easily get redefined later!
+    /**
+     * Caches the proxy classes for each bean.
+     * We need this to prevent filling up the ClassLoaders by
+     */
+    private ConcurrentHashMap<Bean<?>, Class<?>> cachedProxyClasses = new
ConcurrentHashMap<Bean<?>, Class<?>>();
 
 
     public InterceptorDecoratorProxyFactory(WebBeansContext webBeansContext)
@@ -129,12 +135,6 @@ public class InterceptorDecoratorProxyFa
         return null;
     }
 
-    @Override
-    protected void createSerialisation(ClassWriter cw, String proxyClassFileName, Class<?>
classToProxy, String classFileName)
-    {
-        // nothing to do ;)
-    }
-
     /**
      * <p>Create a decorator and interceptor proxy for the given type. A single instance
      * of such a proxy class has exactly one single internal instance.</p>
@@ -158,15 +158,15 @@ public class InterceptorDecoratorProxyFa
      * </p>
      *
      *
+     * @param bean the bean the proxy serves for. Needed for caching and serialisation.
      * @param classLoader to use for creating the class in
      * @param classToProxy the class for which a subclass will get generated
      * @param interceptedMethods the list of intercepted or decorated business methods.
      * @param nonInterceptedMethods all methods which are <b>not</b> intercepted
nor decorated and shall get delegated directly
      * @param <T>
      * @return the proxy class
-     * //X TODO for serialisation reasons this probably needs the Bean it serves.
      */
-    public synchronized <T> Class<T> createProxyClass(ClassLoader classLoader,
Class<T> classToProxy,
+    public synchronized <T> Class<T> createProxyClass(Bean<T> bean, ClassLoader
classLoader, Class<T> classToProxy,
                                                       Method[] interceptedMethods, Method[]
nonInterceptedMethods)
             throws ProxyGenerationException
     {
@@ -186,9 +186,16 @@ public class InterceptorDecoratorProxyFa
             throw new ProxyGenerationException(e);
         }
 
+        cachedProxyClasses.put(bean, clazz);
+
         return clazz;
     }
 
+    public <T> Class<T> getCachedProxyClass(Bean<T> bean)
+    {
+        return (Class<T>) cachedProxyClasses.get(bean);
+    }
+
     @Override
     protected Class getMarkerInterface()
     {
@@ -210,6 +217,26 @@ public class InterceptorDecoratorProxyFa
                 FIELD_INTERCEPTED_METHODS, Type.getDescriptor(Method[].class), null, null).visitEnd();
     }
 
+    @Override
+    protected void createSerialisation(ClassWriter cw, String proxyClassFileName, Class<?>
classToProxy, String classFileName)
+    {
+        String[] exceptionTypeNames = {Type.getType(ObjectStreamException.class).getInternalName()};
+        MethodVisitor mv = cw.visitMethod(Modifier.PUBLIC, "writeReplace", "()Ljava/lang/Object;",
null, exceptionTypeNames);
+
+        // fill method body
+        mv.visitCode();
+
+        // load the contextual instance Provider
+        mv.visitVarInsn(Opcodes.ALOAD, 0);
+        mv.visitFieldInsn(Opcodes.GETFIELD, proxyClassFileName, FIELD_INTERCEPTOR_HANDLER,
Type.getDescriptor(InterceptorHandler.class));
+
+        mv.visitInsn(Opcodes.ARETURN);
+
+        mv.visitMaxs(-1, -1);
+        mv.visitEnd();
+    }
+
+
     /**
      * Each of our interceptor/decorator proxies has exactly 1 constructor
      * which invokes the super ct + sets the delegation field.

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
Fri Jan 25 10:27:14 2013
@@ -52,6 +52,10 @@ public class NormalScopeProxyFactory ext
     /** the name of the field which stores the {@link Provider} for the Contextual Instance
*/
     public static final String FIELD_INSTANCE_PROVIDER = "owbContextualInstanceProvider";
 
+    /**
+     * Caches the proxy classes for each bean.
+     * We need this to prevent filling up the ClassLoaders by
+     */
     private ConcurrentHashMap<Bean<?>, Class<?>> cachedProxyClasses = new
ConcurrentHashMap<Bean<?>, Class<?>>();
 
 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/NewProxyTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/NewProxyTest.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/NewProxyTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/NewProxyTest.java
Fri Jan 25 10:27:14 2013
@@ -75,11 +75,11 @@ public class NewProxyTest extends Abstra
         Map instances = new HashMap();
         instances.put(interceptorBean, interceptor);
         InterceptorHandler interceptorHandler
-                = new DefaultInterceptorHandler<RuntimeExceptionBindingTypeBean>(target,
target, interceptors, instances);
+                = new DefaultInterceptorHandler<RuntimeExceptionBindingTypeBean>(target,
target, interceptors, instances, null);
         
         InterceptorDecoratorProxyFactory factory = new InterceptorDecoratorProxyFactory(getWebBeansContext());
         Class<RuntimeExceptionBindingTypeBean> proxyClass
-                = factory.createProxyClass(Thread.currentThread().getContextClassLoader(),
RuntimeExceptionBindingTypeBean.class, interceptedMethods, null);
+                = factory.createProxyClass(bean, Thread.currentThread().getContextClassLoader(),
RuntimeExceptionBindingTypeBean.class, interceptedMethods, null);
 
         RuntimeExceptionBindingTypeBean instance = factory.createProxyInstance(proxyClass,
target, interceptorHandler);
         int result = instance.business();

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/factory/InterceptorDecoratorProxyFactoryTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/factory/InterceptorDecoratorProxyFactoryTest.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/factory/InterceptorDecoratorProxyFactoryTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/factory/InterceptorDecoratorProxyFactoryTest.java
Fri Jan 25 10:27:14 2013
@@ -18,12 +18,18 @@
  */
 package org.apache.webbeans.newtests.interceptors.factory;
 
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.InjectionPoint;
+import java.lang.annotation.Annotation;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.lang.reflect.Type;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansException;
@@ -57,8 +63,74 @@ public class InterceptorDecoratorProxyFa
         Method[] interceptedMethods = methods.toArray(new Method[methods.size()]);
         Method[] nonInterceptedMethods = null;
 
+        Bean dummyBean = new Bean() {
+            @Override
+            public Object create(CreationalContext context)
+            {
+                return null;
+            }
+
+            @Override
+            public Set<Type> getTypes()
+            {
+                return null;
+            }
+
+            @Override
+            public Set<Annotation> getQualifiers()
+            {
+                return null;
+            }
+
+            @Override
+            public Class<? extends Annotation> getScope()
+            {
+                return null;
+            }
+
+            @Override
+            public String getName()
+            {
+                return null;
+            }
+
+            @Override
+            public boolean isNullable()
+            {
+                return false;
+            }
+
+            @Override
+            public Set<InjectionPoint> getInjectionPoints()
+            {
+                return null;
+            }
+
+            @Override
+            public Class<?> getBeanClass()
+            {
+                return null;
+            }
+
+            @Override
+            public Set<Class<? extends Annotation>> getStereotypes()
+            {
+                return null;
+            }
+
+            @Override
+            public boolean isAlternative()
+            {
+                return false;
+            }
+
+            @Override
+            public void destroy(Object instance, CreationalContext context)
+            {
+            }
+        };
 
-        Class<ClassInterceptedClass> proxyClass = pf.createProxyClass(classLoader,
ClassInterceptedClass.class, interceptedMethods, nonInterceptedMethods);
+        Class<ClassInterceptedClass> proxyClass = pf.createProxyClass(dummyBean, classLoader,
ClassInterceptedClass.class, interceptedMethods, nonInterceptedMethods);
         Assert.assertNotNull(proxyClass);
 
         ClassInterceptedClass internalInstance = new ClassInterceptedClass();

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/resolution/InterceptorProxyChainTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/resolution/InterceptorProxyChainTest.java?rev=1438425&r1=1438424&r2=1438425&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/resolution/InterceptorProxyChainTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/resolution/InterceptorProxyChainTest.java
Fri Jan 25 10:27:14 2013
@@ -122,7 +122,7 @@ public class InterceptorProxyChainTest e
         Method[] businessMethods = methodInterceptors.keySet().toArray(new Method[methodInterceptors.size()]);
         Method[] nonInterceptedMethods = interceptorInfo.getNonInterceptedMethods().toArray(new
Method[interceptorInfo.getNonInterceptedMethods().size()]);
 
-        Class<? extends ClassMultiInterceptedClass> proxyClass = pf.createProxyClass(classLoader,
ClassMultiInterceptedClass.class, businessMethods, nonInterceptedMethods);
+        Class<? extends ClassMultiInterceptedClass> proxyClass = pf.createProxyClass(bean,
classLoader, ClassMultiInterceptedClass.class, businessMethods, nonInterceptedMethods);
         Assert.assertNotNull(proxyClass);
 
 
@@ -135,7 +135,7 @@ public class InterceptorProxyChainTest e
             interceptorInstances.put(interceptorBean, interceptorInstance);
         }
         InterceptorHandler interceptorHandler
-                = new DefaultInterceptorHandler<ClassMultiInterceptedClass>(internalInstance,
internalInstance, methodInterceptors, interceptorInstances);
+                = new DefaultInterceptorHandler<ClassMultiInterceptedClass>(internalInstance,
internalInstance, methodInterceptors, interceptorInstances, null);
 
         ClassMultiInterceptedClass proxyInstance = pf.createProxyInstance(proxyClass, internalInstance,
interceptorHandler);
         Assert.assertNotNull(proxyInstance);



Mime
View raw message