[jboss-jira] [JBoss JIRA] Updated: (JBAS-8792) No request scope during an EJB timeout method
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Tue May 10 01:43:19 EDT 2011
[ https://issues.jboss.org/browse/JBAS-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jaikiran pai updated JBAS-8792:
-------------------------------
Fix Version/s: 6.1.0
(was: No Release)
Marking for 6.1.0, so that it can tracked accordingly.
> No request scope during an EJB timeout method
> ---------------------------------------------
>
> Key: JBAS-8792
> URL: https://issues.jboss.org/browse/JBAS-8792
> Project: Legacy JBoss Application Server 6
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Weld/CDI
> Affects Versions: 6.0.0.CR1, 6.0.0.Final
> Reporter: Adam Warski
> Assignee: Marius Bogoevici
> Fix For: 6.1.0
>
>
> 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 {
> requestContext.associate(context);
> requestContext.activate();
> // Do the timeout stuff
> } 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 ...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list