Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 1.0.1.Final
-
Fix Version/s: 1.1.1.Final
-
Component/s: GlassFish Integration, Interceptors and Decorators
-
Labels:
-
Environment:Windows 7, NetBeans 6.9.1, GlassFish 3.0.1, Mojarra 2.0.2 (FCS b10), Java 1.6.0_22
-
Steps to Reproduce:
Description
I have a @Named bean in which I'd like to inject a component, using @Inject as well as a stateless session bean, using @EJB. The ejb is accessed using the no-interface view. Both references get injected properly in that case, but when I use an interceptor on one of the methods, only the references annotated with @Inject get injected, whereas those annotated with @EJB don't.
The interceptor doesn't need to do anything special, this behaviour occurs even if only proceed() is invoked on the invocation context - the interceptor is always invoked correctly.
The following snippet explains the issue:
@Named
public class MyController {
@EJB
private MyDao dao;
@Interceptors(MyInterceptor.class)
public void control()
}
---------------------------------------------------------------
@Stateless
public class MyDao {
public void doDataAccessStuff()
{ ... }}
---------------------------------------------------------------
public class MyInterceptor {
@AroundInvoke
public Object intercept(InvocationContext context) throws Exception
}
I attached a small NetBeans project that yields the described behaviour