Wondering if anyone has implemented any particularly witty way of raising events serially. The best way to describe what I'm looking to implement is to raise an event with a callback method. Here is a typical use case:
1. Unauthenticated user attempts to access something which is protected
2. User gets login challenge (typical Seam NotLoggedIn event)
3. Upon successful login, previous method can now resume it's work (event #2)
Currently, from what I can see, there are actually two events here. One for login challenge and one for the previous method who raised the NotLoggedIn event. I have one case in my application where I add a "marker" to session, to demarcate some process that failed. Some method listens for PostAuthenticate and checks for that value. This is obviously kludgey and not ideal. An event queue, however, would be ideal for this scenario.
I can think of some obvious solutions, like a simple event queue which interacts with Events serially, but wanted to see if the community has implemented something worth sharing.
Thanks to all