throw new TransactionRolledBackException();
}
}
catch (SystemException ex)
{
throw new HeuristicHazardException();
}
if (out instanceof CoordinationOutcome)
{
int res = ((CoordinationOutcome) out).result();
switch (res)
{
case TwoPhaseResult.CANCELLED:
case TwoPhaseResult.HEURISTIC_CANCEL:
{
if (commit)
throw new TransactionRolledBackException();
}
break;
case TwoPhaseResult.CONFIRMED:
case TwoPhaseResult.HEURISTIC_CONFIRM:
{
if (!commit)
throw new TransactionCommittedException();
}
break;
case TwoPhaseResult.HEURISTIC_MIXED:
throw new HeuristicMixedException();
case TwoPhaseResult.HEURISTIC_HAZARD:
throw new HeuristicHazardException();
case TwoPhaseResult.FINISH_OK:
break;
case TwoPhaseResult.FINISH_ERROR:
default:
throw new HeuristicHazardException();
}
}
else
throw new HeuristicHazardException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wstx11.model.as.twophase.UserTwoPhaseTx_3"));
}