Prev | Next | J2EETM Developer's Guide
Transactions |
transaction.timeout
property in the config/default.properties
file. For example, you would set the timeout value to 5 seconds as follows:
With this setting, if the transaction has not completed within 5 seconds, the EJB container manager rolls it back.transaction.timeout=5
When J2EE is first installed, the timeout value is set to 0:
If the value is 0, the transaction will not time out.transaction.timeout=0
Only enterprise beans with container-managed transactions are affected by the transaction.timeout
property. For enterprise beans with bean-managed, JTA transactions, you invoke the setTransactionTimeout
method of the UserTransaction
interface.