[jboss-user] [JBoss Seam] - Serially raised events

monkeyden do-not-reply at jboss.com
Mon Oct 1 11:34:15 EDT 2007


Using 1.2.1GA

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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090312#4090312

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090312



More information about the jboss-user mailing list