public void handleTransactionsAfterPhase(PhaseEvent event)
{
if ( Init.instance().isTransactionManagementEnabled() )
{
PhaseId phaseId = event.getPhaseId();
boolean commitTran = phaseId == PhaseId.INVOKE_APPLICATION ||
event.getFacesContext().getRenderResponse() || //TODO: no need to commit the tx if we failed to restore the view
event.getFacesContext().getResponseComplete() ||
phaseId == PhaseId.RENDER_RESPONSE;
//( phaseId == PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );