PhaseEvent event = new PhaseEvent(facesContext, phaseId, lifecycle);
for (int i = 0; i < phaseListeners.length; i++)
{
PhaseListener phaseListener = phaseListeners[i];
if (isListenerForThisPhase(phaseListener, phaseId))
{
try
{
phaseListener.beforePhase(event);
beforePhaseSuccess[i] = true;
}
catch (Throwable e)
{
beforePhaseSuccess[i] = false; // redundant - for clarity