Thanks Tom, I have two findings from my investigation.
Let's summarize the scenario I work with. It's basically the same either for JTA-ejb-remoting or WS-txbridge. There is a client which makes a remote call to the second server. The transaction context is propagated along the call. The second server runs the subordinate transaction where two XAResources are in use. As the client knows only one resource it goes with 1PC. The second server runs the 2PC as there is two XAResources available. A failure happens during commit is called on one of the XAResources at the second server.
In case of the JTA I run with the following failures
- The second server crashes JVM. The JVM crash is reported as an error for the 1PC on the client. The client saves this as an heuristic outcome of the transaction to the transaction object store. When the server is restarted it contains a record of prepared XAResource.
Now, it's up to the administrator to finish the resource with the heuristics manually and consider if the XAResource on the server should be committed. This sounds being a correct behaviour. - The XAResource commit throws an XAException.XAER_RMFAIL. In such case the XAResource.commit is stored to the second server object store as failed but the transaction outcome is reported back to the client as success. After that there is a subordinate XAResource which is stored "for infinity" at the second server. It waits for an administrator to finish it. But the administrator does not receive information about this need. This sounds a bit incorrect to me. But as I study the code this behaviour is pretty wired for Narayana. This is the stacktrace[1].
What do you think about this case tomjenkinson, mmusgrov ?
In case of the XTS it's interesting that even for the 1PC two phases are run: narayana/DurableTwoPhaseCommitParticipant.java at 5.9.5.Final · jbosstm/narayana · GitHub
On top of that the commit error is just logged[2] (or narayana/ParticipantProcessorImpl.java at 5.9.5.Final · jbosstm/narayana · GitHub, Throwable is just logged).
jhalliday adinn would you have some idea about this? Thanks.
[1]
at org.jboss.as.test.jbossts.common.TestXAResource.commit(TestXAResource.java)
at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelCommit(XAResourceRecord.java:473)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doCommit(BasicAction.java:2892)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doCommit(BasicAction.java:2808)
at com.arjuna.ats.arjuna.coordinator.BasicAction.phase2Commit(BasicAction.java:1873)
at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1529)
at com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.SubordinateAtomicAction.doOnePhaseCommit(SubordinateAtomicAction.java:244)
at com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.TransactionImple.doOnePhaseCommit(TransactionImple.java:259)
at org.wildfly.transaction.client.provider.jboss.JBossLocalTransactionProvider$Entry.commit(JBossLocalTransactionProvider.java:500)
at org.wildfly.transaction.client.provider.remoting.TransactionServerChannel.lambda$handleXaTxnCommit$7(TransactionServerChannel.java:624)
at org.wildfly.security.auth.server.SecurityIdentity.runAsConsumer(SecurityIdentity.java:361)
at org.wildfly.transaction.client.provider.remoting.TransactionServerChannel.handleXaTxnCommit(TransactionServerChannel.java:615)
at org.wildfly.transaction.client.provider.remoting.TransactionServerChannel$ReceiverImpl.handleMessage(TransactionServerChannel.java:124)
at org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:430)
at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:949)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
[2]
ARJUNA016141: Error committing transaction 'TransactionImple <jca-subordinate, basicaction::ffff0a280527:-4db02b44:5cc6e3f3:23,status:actionstatus.committed="">' for xid: <131080,29,64,0000000000-1-11040539-7879-44-6892-58-29-130002749,0000000000000000000000000000000000000000000000000000000000000000>
at com.arjuna.ats.internal.jta.transaction.arjunacore.jca.XATerminatorImple.commit(XATerminatorImple.java:109)
at org.jboss.jbossts.txbridge.inbound.BridgeDurableParticipant.commit(BridgeDurableParticipant.java:205)
at com.arjuna.wst11.messaging.engines.ParticipantEngine.executeCommit(ParticipantEngine.java:576)
at com.arjuna.wst11.messaging.engines.ParticipantEngine.commit(ParticipantEngine.java:149)
at com.arjuna.wst11.messaging.ParticipantProcessorImpl.commit(ParticipantProcessorImpl.java:99)
at com.arjuna.webservices11.wsat.sei.ParticipantPortTypeImpl$2.executeTask(ParticipantPortTypeImpl.java:84)
at com.arjuna.services.framework.task.TaskWorker.run(TaskWorker.java:63)
at java.lang.Thread.run(Thread.java:748)