-
1. Re: Conversation Scoped Observers
flashguru Feb 19, 2008 1:45 AM (in response to flashguru)The more I think about it the more complex the issue is.
If a session-scoped component fires an event that has a conversation-scoped observer, should all instances of the observer from all available conversations be notified?
It sounds like conversation-scope observers better not count on events fired by components from any other scopes but the conversation scope.
-
2. Re: Conversation Scoped Observers
flashguru Feb 19, 2008 1:59 AM (in response to flashguru)As far as I can tell, Seam does not have the concept of scoped events. That is, there is no way for specifying the scope of the event when calling Events.raiseEvent().
Therefore, I can only think of the following as the guideline when writing conversation-scoped observers:
Your conversation-scoped observers should only listen to events that you deem to be of conversation scoped nature. The 'loginSuccessful' event is an example of an event that you should avoid listening to in your conversation-scoped components. -
3. Re: Conversation Scoped Observers
gavin.king Feb 19, 2008 4:40 AM (in response to flashguru)Seam events are always processed in the current contexts.
-
4. Re: Conversation Scoped Observers
gavin.king Feb 19, 2008 4:41 AM (in response to flashguru)P.S. Please use your real name and email address here.
-
5. Re: Conversation Scoped Observers
flashguru Feb 19, 2008 5:47 AM (in response to flashguru)Thanks Gavin!
I am addicted to conversation-scoped components but in the case of events, they do not seem to really go well as observers :)
-
6. Re: Conversation Scoped Observers
gavin.king Feb 19, 2008 2:55 PM (in response to flashguru)It sounds to me like you should be using a session-scoped observer in this particular case. (You're trying to affect-some session-global state, by the sounds of it.)