Github user bayern39 commented on the issue:
https://github.com/apache/activemq-artemis/pull/595
@clebertsuconic hi,at present,it scans for old transactions and rollback
any it finds in RM,in the method
"tx.hasTimedOut(now, defaultTimeoutSeconds)",i think it is not only
scanning for defaultTimeout transactions,but also has hi the timeout on the
TX,because we can see the implementation of "hasTimedOut" ,if we had set the
timeout of the TX,it would be hit in the ResourceManager.
`public boolean hasTimedOut(final long currentTime, final int
defaultTimeout) {
synchronized (timeoutLock) {
boolean timedout;
if (timeoutSeconds == -1) {
timedout = getState() != Transaction.State.PREPARED &&
currentTime > createTime + defaultTimeout * 1000;
}
else {
timedout = getState() != Transaction.State.PREPARED &&
currentTime > createTime + timeoutSeconds * 1000;
}
if (timedout) {
markAsRollbackOnly(new ActiveMQException("TX Timeout"));
}
return timedout;
}
}
`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---