[jboss-jira] [JBoss JIRA] Reopened: (JBAS-8792) No request scope during an EJB timeout method
Jason Greene (JIRA)
jira-events at lists.jboss.org
Thu Apr 21 14:26:44 EDT 2011
[ https://issues.jboss.org/browse/JBAS-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Greene reopened JBAS-8792:
--------------------------------
Due to feedback from the community, I have split the AS7 and AS6 projects and reopened all unscheduled AS6 issues that are a year or less old. This will make it easier community members to find and work on them.
Future releases beyond 6.1 can be done provided a community member steps up to coordinate them.
> 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: No Release
>
>
> 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