[weld-issues] [JBoss JIRA] Updated: (WELDINT-54) Injection into EJB Interceptor classes does not occur

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Mar 8 07:38:58 EST 2010


     [ https://jira.jboss.org/jira/browse/WELDINT-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir updated WELDINT-54:
-----------------------------

      Component/s: JBoss EJB 3.0 integration
    Fix Version/s: 6.0.0.CR1


Move to Weld-JBoss-Integration

> Injection into EJB Interceptor classes does not occur
> -----------------------------------------------------
>
>                 Key: WELDINT-54
>                 URL: https://jira.jboss.org/jira/browse/WELDINT-54
>             Project: Weld Integration
>          Issue Type: Bug
>          Components: JBoss EJB 3.0 integration
>    Affects Versions: 6.0.0.Beta9
>         Environment: JBoss 6.0.0 M2 with Weld 1.0.1 Final, on Windows XP SP3 and JDK 1.6
>            Reporter: Ian
>             Fix For: 6.0.0.CR1
>
>
> An interceptor for an EJB (not a Weld interceptor) is a contained managed class, yet it is not being injected with any dependencies.
> Some example code:
> public class FaultBarrierInterceptor {
>     @Inject
>     private Logger log;
>     @AroundInvoke
>     public Object intercept(final InvocationContext invocationContext)
> 	    throws Exception {
> 	try {
> 	    return invocationContext.proceed();
> 	}
> 	catch (RuntimeException e) {
> 	    log.error("An uncaught exception was caught: \n-METHOD: " + invocationContext.getMethod() + "\n-PARAMS: " +
> 		      Arrays.toString(invocationContext.getParameters()));
> 	    throw new MyUncaughtException(e);
> 	}
>     }
> }
> When you debug this code, the logger variable is not injected.
> The code for the EJB has a local interface (it's an EJB 3.0 structure, not 3.1). The interceptor definition is:
> @Stateless
> @Interceptors( {FaultBarrierInterceptor.class})
> public class OptinServiceBean
> 	implements OptinService {
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list