By way of support there is now an additional method on TransactionTimeoutConfiguration
and interface implemented by the JBoss tranasction manager.
- Get the time left before transaction timeout
- @param errorRollback throw an error if the transaction is marked for rollback
- @return the remaining in the current transaction or -1
- if there is no transaction
- @throws RollbackException if the transaction is marked for rollback and
- errorRollback is true
long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws RollbackException;
This interface is now also implemented by the connection manager passed to the ManagedConnectionFactory
when creating connection factories like DataSources.
The TxConnectionManager just delegates to the transaction manager (if it implements the interface)
otherwise -1 is returned, which is also the value returned for no-tx connection managers.