@Override
public void rollback() throws IllegalStateException, SecurityException,
SystemException {
- if ( status == Status.STATUS_NO_TRANSACTION) {
- throw new IllegalStateException("Rollback while not in a transaction");
+ if (status == Status.STATUS_NO_TRANSACTION) {
+ throw new IllegalStateException(
+ "Rollback while not in a transaction");
}
try {
for (int i = 0; i < resources.length; i++) {
resources[i].rollback(txStates[i]);
}
} catch (Exception e) {
- committing = false;
+ committing = false;
}
}
-
- if (!committing) {
+
+ if (!committing) {
throw new HeuristicMixedException("Commit failed");
}
} finally {
@Override
public void setRollbackOnly() throws IllegalStateException, SystemException {
- if ( status == Status.STATUS_NO_TRANSACTION) {
- throw new IllegalStateException("setRollbackOnly() while not in a transaction");
+ if (status == Status.STATUS_NO_TRANSACTION) {
+ throw new IllegalStateException(
+ "setRollbackOnly() while not in a transaction");
}
status = Status.STATUS_MARKED_ROLLBACK;
}