[
https://issues.apache.org/jira/browse/OWB-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849762#action_12849762
]
Mark Struberg commented on OWB-337:
-----------------------------------
Sadly in my case there is none :(
BeanManager.getContext() throws that very ContextNotActiveException above.
> What do you mean by saying 1 ConversationContext?
The spec is designed to only maintain 1 Context instance for 1 scope. This
context does maintain different 'conversation storages' internally as we do
with our ConversationManager. So there is no problem with any concurrency.
For now, I'll catch this ContextNotActiveException in this special case.
But first I'll write to Gavin to clarify how it should behave from the
conceptional view.
> events must not get broadcasted to beans which have no active Context
> ---------------------------------------------------------------------
>
> Key: OWB-337
> URL: https://issues.apache.org/jira/browse/OWB-337
> Project: OpenWebBeans
> Issue Type: Bug
> Affects Versions: M4
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Priority: Minor
> Fix For: 1.0.0
>
>
> If someone fires an Event, we currently deliver it to all contextual
> instances of beans which are registered for that event, even if those beans
> are in a context which is not active yet.
> This happens for example in the following situation:
> A
> UserLogOutFilter implements javax.servlet.Filter
> sends a UserSettingsChangeEvent.
> A @ConversationScoped MyBusinessBean @Observes UserSettingsChangeEvent.
> But at the time the servlet filter does run, there is no active
> ConversationContext yet. This leads to the following Exception:
> javax.enterprise.context.ContextNotActiveException: WebBeans context with
> scope type annotation @ConversationScoped does not exist within current thread
> at
> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:279)
> at
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:201)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.