diff --git a/src/main/java/org/wildfly/transaction/client/LocalTransaction.java b/src/main/java/org/wildfly/transaction/client/LocalTransaction.java index 248adf0..8a4c67a 100644 --- a/src/main/java/org/wildfly/transaction/client/LocalTransaction.java +++ b/src/main/java/org/wildfly/transaction/client/LocalTransaction.java @@ -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); } diff --git a/src/main/java/org/wildfly/transaction/client/_private/Log.java b/src/main/java/org/wildfly/transaction/client/_private/Log.java index bc457f8..d3cfd33 100644 --- a/src/main/java/org/wildfly/transaction/client/_private/Log.java +++ b/src/main/java/org/wildfly/transaction/client/_private/Log.java @@ -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); }