Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFTC-141] Wildfly-transaction-client doesn't log that the transaction timeout wasn't set, when the driver returns false #196

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}