-
Bug
-
Resolution: Done
-
Major
-
7.1.2.Final (EAP)
-
None
In order to prevent leaking active transactions from processing of web requests a TransactionRollbackSetupAction is installed by transactions subsystem for web subsystem to use. This causes usecases where we want JTA TX to span different web apps over cross-context includes to fail, as the setup action is applied around each cross-context include, and forcefully rolls back any TX still active at the end of dispatching.
A concrete use case are portals that rely on cross-context includes.
Java EE Platform 6 Spec says the following in section EE.4.2.2:
"Returning from the service method to the network client with an active transaction context is an error. The web container is required to detect this error and abort the transaction.
As specified above in Section EE.4.2.1.2, “Transaction Non-Requirements,” requests made within a web container using the RequestDispatcher must propagate any transaction context to the called class. Unless the called class commits or aborts the transaction, the transaction must remain active when the called class returns."
There is no talk here about cross-context includes or application boundaries. Therefore it seems the current implementation is not spec-compliant.
TransactionRollbackSetupAction should only be applied on an original incoming web request, not on each cross-context include.