JBoss5.1 JTA TransactionInProgress
alkeshredhat Jul 3, 2019 3:32 AMUsing JBoss 5.1 , Arjuna
This may be basic question but Let say I have EJB A & EJB B.
Client -(Calls) -> EJB A (Managed transaction)
EJB A -(Calls) ->() EJB B (Managed transaction)
At this point Jboss prints.. Logs get printed as 019-07-02 22:03:59,593 WARN [com.arjuna.ats.jta.logging.loggerI18N] (TRADE_SU#BPS) [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.multipleWarning] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.multipleWarning] Multiple last resources have been added to the current transaction. This is transactionally unsafe and should not be relied upon. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@a07c8423
When EJB B gets completed, it tries to commit transaction. but error message is Could not commit transaction. with following exception
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Could not commit transaction.
I have tried to set transaction attribute but its not working somehow.
ejb-jar.xml
<container-transaction id="MethodTransaction_15">
<method id="MethodElement_15">
<ejb-name>EJBA</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction id="MethodTransaction_15">
<method id="MethodElement_15">
<ejb-name>EJBB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
so my question is, Is there any way to create a new transaction for EJB B instead of adding it to EJB A transaction? Is there any way to set transaction attribute in local ejb?
How can i debug if which transaction attribute EJB is using?
this works perfactly in WebSphere 8.5, Any hint will be very helpful.