Skip to content

Commit

Permalink
fix threadlocal miss remove issue, for changmingxie#219
Browse files Browse the repository at this point in the history
  • Loading branch information
changming.xie committed Dec 18, 2018
1 parent 24d408b commit d0cf10c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void run() {
commitTransaction(transaction);
}
}


public void rollback(boolean asyncRollback) {

Expand Down Expand Up @@ -165,13 +165,15 @@ public void cleanAfterCompletion(Transaction transaction) {
Transaction currentTransaction = getCurrentTransaction();
if (currentTransaction == transaction) {
CURRENT.get().pop();
if (CURRENT.get().size() == 0) {
CURRENT.remove();
}
} else {
throw new SystemException("Illegal transaction when clean after completion");
}
}
}


public void enlistParticipant(Participant participant) {
Transaction transaction = this.getCurrentTransaction();
transaction.enlistParticipant(participant);
Expand Down

0 comments on commit d0cf10c

Please sign in to comment.