fixes close tx before notifying that tx completed
@@ -82,39 +82,42 @@ public class CommitManager {
@Override
public void committed() {
try {
- aco.committed();
- } finally {
+ // perform cleanup and close tx before notifying observer
finish(TxResult.COMMITTED);
+ } finally {
+ aco.committed();
}
}
@Override
public void failed(Throwable t) {
try {
- aco.failed(t);
- } finally {
+ // perform cleanup and close tx before notifying observer
finish(TxResult.ERROR);
+ } finally {
+ aco.failed(t);
}
}
@Override
public void alreadyAcknowledged() {
try {
- aco.alreadyAcknowledged();
- } finally {
+ // perform cleanup and close tx before notifying observer
finish(TxResult.AACKED);
+ } finally {
+ aco.alreadyAcknowledged();
}
}
@Override
public void commitFailed(String msg) {
try {
- aco.commitFailed(msg);
- } finally {
+ // perform cleanup and close tx before notifying observer
finish(TxResult.COMMIT_EXCEPTION);
+ } finally {
+ aco.commitFailed(msg);
}
}
-
}
