]
Tom Jenkinson reassigned JBTM-2266:
-----------------------------------
Assignee: (was: Tom Jenkinson)
TransactionReaper is using currentTimeMillis for timeout calculation
--------------------------------------------------------------------
Key: JBTM-2266
URL:
https://issues.jboss.org/browse/JBTM-2266
Project: JBoss Transaction Manager
Issue Type: Enhancement
Affects Versions: 5.0.3
Reporter: David Lloyd
Priority: Minor
Noticed while browsing through some code that the TransactionReaper uses
currentTimeMillis() to calculate timeouts. However the timestamp reported by this method
can change in an unexpected way if the system clock is changed.
An artificial clock based on System.nanoTime() should be used instead, since while this
time may vary slightly between cores, in general it will be highly accurate and, most
importantly, monotonic and steady (and unaffected by changes to the system time).