Download
FAQ History |
API
Search Feedback |
Transaction Timeouts
For container-managed transactions, you control the transaction timeout interval by setting the value of the
timeout-in-seconds
property in thedomain.xml
file, which is in theconfig
directory of your J2EE Application Server installation. 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 rolls it back.
When the J2EE application server is first installed, the timeout value is set to 0:
If the value is 0, the transaction will not time out.
Only enterprise beans with container-managed transactions are affected by the
timeout-in-seconds
property. For enterprise beans with bean-managed JTA transactions, you invoke thesetTransactionTimeout
method of theUserTransaction
interface.
Download
FAQ History |
API
Search Feedback |
All of the material in The J2EE(TM) 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.