Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
6.0.0.CR1, 6.0.0.Final
-
None
Description
Since AS6 CR1, during an EJB timeout method, when trying to use request-scoped beans, I am getting an exception: "No active contexts for scope type javax.enterprise.context.RequestScoped". According to specs, this should work.
As a temporary workaround, I am registering a request context by hand:
@Inject
BoundRequestContext requestContext;
Map<String, Object> context = new HashMap<String, Object>();
try
finally
{ requestContext.invalidate(); requestContext.deactivate(); requestContext.dissociate(context); }Btw. I tried doing this with an interceptor, but it seems that neither EJB interceptors or CDI interceptors work with timers ...