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 2010/03/25 17:17:27 UTC
[jira] Commented: (OWB-337) events must not get broadcasted to
beans which have no active Context
[ https://issues.apache.org/jira/browse/OWB-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849747#action_12849747 ]
Mark Struberg commented on OWB-337:
-----------------------------------
This is exactly where we would need to only have 1 ConversationContext instance which we could ask for isActive()...
> 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.