[jboss-cvs] JBossAS SVN: r94717 - projects/weld-int/trunk/ejb/src/main/java/org/jboss/weld/integration/ejb/interceptor.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 12 21:18:49 EDT 2009
Author: marius.bogoevici
Date: 2009-10-12 21:18:49 -0400 (Mon, 12 Oct 2009)
New Revision: 94717
Modified:
projects/weld-int/trunk/ejb/src/main/java/org/jboss/weld/integration/ejb/interceptor/Jsr299BindingsInterceptor.java
Log:
Fix for applying the JSR299-registered interceptors
Modified: projects/weld-int/trunk/ejb/src/main/java/org/jboss/weld/integration/ejb/interceptor/Jsr299BindingsInterceptor.java
===================================================================
--- projects/weld-int/trunk/ejb/src/main/java/org/jboss/weld/integration/ejb/interceptor/Jsr299BindingsInterceptor.java 2009-10-13 01:16:14 UTC (rev 94716)
+++ projects/weld-int/trunk/ejb/src/main/java/org/jboss/weld/integration/ejb/interceptor/Jsr299BindingsInterceptor.java 2009-10-13 01:18:49 UTC (rev 94717)
@@ -35,7 +35,10 @@
import org.jboss.weld.ejb.spi.EjbDescriptor;
import org.jboss.weld.ejb.spi.InterceptorBindings;
+import org.jboss.weld.ejb.spi.EjbServices;
+import org.jboss.weld.ejb.spi.helpers.ForwardingEjbServices;
import org.jboss.weld.integration.ejb.SessionBeanInterceptor;
+import org.jboss.weld.integration.ejb.JBossEjbServices;
import org.jboss.weld.manager.api.WeldManager;
/**
@@ -70,11 +73,18 @@
private <T> void init(InvocationContext invocationContext)
{
- // create contextual instances for interceptors
+ // create contextual instances for inteDITrceptors
interceptorInstances = new ConcurrentHashMap<String, Object>();
EjbDescriptor<?> ejbDescriptor = (EjbDescriptor<?>) invocationContext.getContextData().get(SessionBeanInterceptor.EJB_DESCRIPTOR);
- //interceptorBindings = ejbServices.getInterceptorBindings(ejbDescriptor);
- // TODO get the bindings associated with the EjbDescriptor or the EjbServices instance
+ EjbServices ejbServices = beanManager.getServices().get(EjbServices.class);
+ if (ejbServices instanceof ForwardingEjbServices)
+ {
+ ejbServices = ((ForwardingEjbServices)ejbServices).delegate();
+ }
+ if (ejbServices instanceof JBossEjbServices)
+ {
+ interceptorBindings = ((JBossEjbServices)ejbServices).getInterceptorBindings(ejbDescriptor);
+ }
if (interceptorBindings != null)
{
More information about the jboss-cvs-commits
mailing list