Remote user transaction timeout from a remote client can not be changed in JBoss EAP 6/7
Environment
Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4
- 7.0
Issue
-
Remote client application that initiates a user transaction was unable to override the default transaction timeout by calling userTransaction.setTransactionTimeout(int)
-
The setTransactionTimeout method no longer work from a remote EJB client.
Resolution
It is already fixed in EAP 7.1, but only when a 7.1 client talks to a 7.1 server.
The protocol now carries the estimated remaining time of the transaction, so each node or resource involved in the transaction is enlisted accordingly. When the timeout occurs, all the participants of the transaction should be timing out. This includes remote UserTransaction as well as server-to-server distributed JTA.
Root Cause
The issue is related to remote EJB client transactions where it is not possible to communicate a dynamic timeout period due to limitations of the remote communication protocol.
Because of any implementation to include a timeout period in the remote communication requires a protocol change, it would make it impossible for servers at different CP levels (e.g. 6.4.15 and 6.4.16 if a change were made in CP16) to communicate with each other.
The remote branch timeout period is always going to be hardcoded until 7.1.x.
A similar limitation is observed with server-to-server propagation scenarios where EJBClient is not used directly.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.