Dear all,
I recently upgraded my application from MyFaces 1.1 to MyFaces core 1.1.3
/Tomahawk 1.1.2 and amongst other differences between the two versions I
discovered the following:
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:
…
try {
phaseListener.beforePhase(new PhaseEvent(facesContext, phaseId, lifecycle));
beforePhaseSuccess[i] = true;
} catch (Exception e) {
beforePhaseSuccess[i] = false; // redundant - for clarity
log.error("Exception in PhaseListener " + phaseId.toString() + "
beforePhase.", e);
return;
}
...
Is this the expected behavior? In MyFaces 1.1.1 any exceptions thrown inside
phase listeners were directly handled by the FacesServlet class and eventually
propagated all the way up (to servlet filters etc.).
Perhaps this change is not news to you (I worked strictly with the 1.1
distribution all this time, and did not closely follow the nightly build
changes), but if someone could clarify whether this is a bug or a more accurate
implementation of the JSF scpec I would appreciate it.
Thank you in advance
Mario