diff --git a/jpos/src/main/java/org/jpos/transaction/TransactionManager.java b/jpos/src/main/java/org/jpos/transaction/TransactionManager.java index 06750a9502..74e7c63ac9 100644 --- a/jpos/src/main/java/org/jpos/transaction/TransactionManager.java +++ b/jpos/src/main/java/org/jpos/transaction/TransactionManager.java @@ -257,7 +257,7 @@ private void runTransaction (Serializable context, int session) { evt = null; thread.setName (getName() + "-" + session + ":idle"); int action = -1; - id = head.incrementAndGet (); + id = head.getAndIncrement (); TMEvent tme = new TMEvent(getName(), id); Txn txn = new Txn(getName(), id); @@ -835,6 +835,9 @@ protected void snapshot (long id, Serializable context) { snapshot (id, context, null); } protected void snapshot (long id, Serializable context, Integer status) { + if (!doRecover && status != DONE) + return; // nothing to do + var jfr = new TMEvent.Snapshot(getName()+":"+status, id); jfr.begin();