I think it's a case of "somebody has to win and somebody has to lose"
-- there's no perfect answer for this situation.

However, if you can improve on it somehow, please submit a patch.
Maybe the exception can be saved, and if no other exceptions are
thrown in afterPhase(), we can at that point rethrow the beforePhase()
exception.

That behavior makes sense to me.


On 5/18/06, Marios Kerkemezos <[EMAIL PROTECTED]> wrote:
Mike Kienenberger wrote :
>> Take a look at this issue and see if it answers your questions.
>> http://issues.apache.org/jira/browse/MYFACES-1205

Just a quick thank you note for clearing this up for me...

I copy from the provided link:

"[...] the behavior of PhaseListener implementations [...] must guarantee that if "beforePhase()" is 
called, then "afterPhase()" must also be called, regardless of any thrown exceptions. Please see Section 11.3 
"PhaseListener" for more specifics."

What i usually have is a PhaseListener for handling "special" kinds of requests 
(like requests for generating Jasper Reports) and a top level Servlet filter for catching 
any exceptions and redirecting the user to an error page. This functionality is now 
broken but  I suppose an exception handling scheme within my phase listeners will do the 
trick here (it still feels a bit akward, but i guess it will have to do).

Thanks for your time.
Mario


On 5/17/06, Marios Kerkemezos wrote:
>   When an exception is thrown during the execution of a PhaseListener (either 
during its beforePhase or afterPhase method), the exception is
>   consumed by a new class (PhaseListenerManager.java), which simply logs it 
and does not let it propagate any further:




Reply via email to