Skip to content

Commit

Permalink
[WFTC-141] Wildfly-transaction-client doesn't log that the transactio…
Browse files Browse the repository at this point in the history
…n timeout wasn't set, when the driver returns false
  • Loading branch information
lvydra committed Jan 12, 2024
1 parent ce8d6a0 commit d67ea28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public boolean enlistResource(final XAResource xaRes) throws RollbackException,
final int estimatedRemainingTime = getEstimatedRemainingTime();
if(estimatedRemainingTime == 0) throw Log.log.cannotEnlistToTimeOutTransaction(xaRes, this);
try {
xaRes.setTransactionTimeout(estimatedRemainingTime);
if (!xaRes.setTransactionTimeout(estimatedRemainingTime)) {
Log.log.setTimeoutUnsuccessful(estimatedRemainingTime);
}
} catch (XAException e) {
throw Log.log.setTimeoutFailed(estimatedRemainingTime, e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,8 @@ public interface Log extends BasicLogger {

@Message(id = 101, value = "Failed to read Xid '%s' from xa resource recovery file %s")
IOException readXidFromXAResourceRecoveryFileFailed(String xidString, Path filePath, @Cause Exception e);

@LogMessage(level = Logger.Level.WARN)
@Message(id = 102, value = "Failed to set transaction timeout of %d")
void setTimeoutUnsuccessful(int timeout);
}

0 comments on commit d67ea28

Please sign in to comment.