Transaction Timeouts

For container-managed transactions, you control the transaction timeout interval by setting the value of the timeout-in-seconds property in the domain.xml file, which is in the config directory of your Application Server installation. For example, you would set the timeout value to 5 seconds as follows:

timeout-in-seconds=5

With this setting, if the transaction has not completed within 5 seconds, the EJB container rolls it back.

When the Application Server is first installed, the timeout value is set to 0:

timeout-in-seconds=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 ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.