The JBossAS integration code (specifically TransactionManagerDelegate) includes an implementation of the TransactionTimeoutConfiguration.getTimeLeftBeforeTransactionTimeout method. The behaviour of this method does not currently match the expectations of the AS code. The integration SPI is not particularly well documented but it's clear we can make some modifications to improve matters. For the maintenance branch (TS 4.2.3.SP, AS 4.x) these will be limited to improving exception handling. For trunk (TS 4.4, AS 5.0) we can make more extensive changes, perhaps encompassing modification of the integration SPI and taking advantage of the transaction reaper changes to support actually returning a sensible value from this method.