Re: Difference between ClientSideRedirectException and InterruptDispatchException
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Ming Peng wrote: > Hi > I have a question about the ClientSideRedirectException and > InterruptDispatchException. > I create a "ValidatedLoginEvent" and made it parent of all the other > events.If an event such as "LoginEvent" is fired,the parent event will > be fired first.When I handles the parent event ,I would throw an > Exception for some login errors.Which exception should I use? It depends on what you want to do then - if you want to clear the EventQueue and simply pass the event flow to the login-event, you can use InterruptDispatchException. However, what we did in this case was to persist the initial request (which is IMHO somehow supported by barracuda itself, but I don't remember that in detail right now) and the throw a ClientSideRedirectException (CSRE) to the loginscreen. When the use is actually logged in, we throw a CSRE again to get into the originating event flow. Diez