You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2018/07/14 06:56:00 UTC
[jira] [Commented] (MEECROWAVE-91) RequestScoped context not active
for @Observes @Initialized(ApplicationScoped.class)
[ https://issues.apache.org/jira/browse/MEECROWAVE-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16544090#comment-16544090 ]
Mark Struberg commented on MEECROWAVE-91:
-----------------------------------------
I've evaluated this and it is actually an OWB issue.
It's also a rather tricky one. Because if we start the RequestContext before the ApplicationContext then we probably also fire any @Initialized(RequestScoped.class) event. Classical chicken-egg.
We probably want to start the RequestContext without firing the Initialized event for it? But then if a @RequestScoped bean relies on it it might not be initialised...
> RequestScoped context not active for @Observes @Initialized(ApplicationScoped.class)
> -------------------------------------------------------------------------------------
>
> Key: MEECROWAVE-91
> URL: https://issues.apache.org/jira/browse/MEECROWAVE-91
> Project: Meecrowave
> Issue Type: Bug
> Affects Versions: 1.2.0
> Reporter: Mark Struberg
> Priority: Critical
> Fix For: 1.2.3
>
>
> {code}
> public void init(@Observes @Initialized(ApplicationScoped.class) Object initVal) {
> someRequestScopedBean.doSomething() // <- boom ContextNotActiveException
> }
> {code}
> This must work according to the CDI spec.
> Note that this is an integration issue in Meecrowave and no OWB core issue.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)