Assert.fail("Unknown transaction state '" + state + "'");
}
}
public void abortTran() {
final IsisTransactionManager transactionManager = getTransactionManager();
final IsisTransaction transaction = transactionManager.getTransaction();
if(transaction == null) {
Assert.fail("No transaction exists");
return;
}
final State state = transaction.getState();
switch(state) {
case ABORTED:
break;
case COMMITTED:
Assert.fail("Transaction is in state of '" + state + "'");
break;
case MUST_ABORT:
case IN_PROGRESS:
transactionManager.abortTransaction();
break;
default:
Assert.fail("Unknown transaction state '" + state + "'");
}
}