Author: marius.bogoevici
Date: 2010-01-26 10:15:11 -0500 (Tue, 26 Jan 2010)
New Revision: 5632
Modified:
core/trunk/bom/pom.xml
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
Log:
WELD-400, WELD-325
Modified: core/trunk/bom/pom.xml
===================================================================
--- core/trunk/bom/pom.xml 2010-01-26 04:04:23 UTC (rev 5631)
+++ core/trunk/bom/pom.xml 2010-01-26 15:15:11 UTC (rev 5632)
@@ -76,7 +76,7 @@
<javassist.version>3.11.0.GA</javassist.version>
<cdi.tck.version>1.0.1-CR1</cdi.tck.version>
<atinject.tck.version>1.0.0-PFD-3</atinject.tck.version>
- <jboss.interceptor.version>1.0.0-CR8</jboss.interceptor.version>
+ <jboss.interceptor.version>1.0.0-CR9</jboss.interceptor.version>
<slf4j.version>1.5.10</slf4j.version>
<cal10n.version>0.7.2</cal10n.version>
</properties>
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2010-01-26
04:04:23 UTC (rev 5631)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2010-01-26
15:15:11 UTC (rev 5632)
@@ -52,7 +52,8 @@
import org.jboss.interceptor.model.InterceptionModel;
import org.jboss.interceptor.model.InterceptionModelBuilder;
-import org.jboss.interceptor.model.InterceptorClassMetadataImpl;
+import org.jboss.interceptor.model.InterceptorClassMetadata;
+import org.jboss.interceptor.registry.InterceptorClassMetadataRegistry;
import org.jboss.interceptor.util.InterceptionUtils;
import org.jboss.interceptor.util.proxy.TargetInstanceProxy;
import org.jboss.weld.bean.proxy.DecoratorProxyMethodHandler;
@@ -626,7 +627,7 @@
}
}
InterceptionModel<Class<?>, Class<?>> interceptionModel =
builder.build();
- InterceptorClassMetadataImpl interceptorClassMetadata = new
InterceptorClassMetadataImpl(getType());
+ InterceptorClassMetadata interceptorClassMetadata =
InterceptorClassMetadataRegistry.getRegistry().getInterceptorClassMetadata(getType(),
true);
hasSerializationOrInvocationInterceptorMethods =
!interceptorClassMetadata.getInterceptorMethods(org.jboss.interceptor.model.InterceptionType.AROUND_INVOKE).isEmpty()
||
!interceptorClassMetadata.getInterceptorMethods(org.jboss.interceptor.model.InterceptionType.AROUND_TIMEOUT).isEmpty()
||
!interceptorClassMetadata.getInterceptorMethods(org.jboss.interceptor.model.InterceptionType.PRE_PASSIVATE).isEmpty()
||
!interceptorClassMetadata.getInterceptorMethods(org.jboss.interceptor.model.InterceptionType.POST_ACTIVATE).isEmpty();
if (interceptionModel.getAllInterceptors().size() > 0 ||
hasSerializationOrInvocationInterceptorMethods)
beanManager.getClassDeclaredInterceptorsRegistry().registerInterceptionModel(getType(),
builder.build());
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2010-01-26 04:04:23
UTC (rev 5631)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2010-01-26 15:15:11
UTC (rev 5632)
@@ -41,6 +41,7 @@
import javax.enterprise.inject.spi.Interceptor;
import javax.enterprise.inject.spi.PassivationCapable;
+import javassist.util.proxy.MethodHandler;
import org.jboss.interceptor.proxy.InterceptionHandlerFactory;
import org.jboss.interceptor.proxy.InterceptorProxyCreatorImpl;
import org.jboss.interceptor.registry.InterceptorRegistry;
@@ -63,6 +64,7 @@
import org.jboss.weld.serialization.spi.helpers.SerializableContextual;
import org.jboss.weld.util.AnnotatedTypes;
import org.jboss.weld.util.Beans;
+import org.jboss.weld.util.CleanableMethodHandler;
import org.jboss.weld.util.reflection.Reflections;
import org.slf4j.cal10n.LocLogger;
import org.slf4j.ext.XLogger;
@@ -575,7 +577,11 @@
interceptionHandlerFactories.add(new
CdiInterceptorHandlerFactory<T>(creationalContext, beanManager));
}
if (interceptionRegistries.size() > 0)
- instance = new InterceptorProxyCreatorImpl(interceptionRegistries,
interceptionHandlerFactories).createProxyFromInstance(instance, getType());
+ {
+ InterceptorProxyCreatorImpl interceptorProxyCreator = new
InterceptorProxyCreatorImpl(interceptionRegistries, interceptionHandlerFactories);
+ MethodHandler methodHandler = new
CleanableMethodHandler(interceptorProxyCreator.getMethodHandler(instance, getType()));
+ instance =
interceptorProxyCreator.createProxyInstance(InterceptorProxyCreatorImpl.createProxyClassWithHandler(getType(),
methodHandler), methodHandler);
+ }
}
catch (Exception e)
Modified: core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
===================================================================
--- core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-01-26 04:04:23 UTC
(rev 5631)
+++ core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-01-26 15:15:11 UTC
(rev 5632)
@@ -59,6 +59,13 @@
<exclude
name="testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails" />
</methods>
</class>
+
+ <!-- WELD-325 fixed, pending on CDITCK-102 -->.
+ <class
name="org.jboss.jsr299.tck.tests.context.dependent.DependentContextTest">
+ <methods>
+ <exclude
name="testDependentScopedInterceptorsAreDependentObjectsOfBean"/>
+ </methods>
+ </class>
<!-- Issues in JBoss AS -->
Show replies by date