[jbossts-issues] [JBoss JIRA] (JBTM-2983) Commit failure in WFLY LocalResource does not return error to the caller

Ondra Chaloupka (JIRA) issues at jboss.org
Mon Feb 26 16:38:00 EST 2018

     [ https://issues.jboss.org/browse/JBTM-2983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ondra Chaloupka updated JBTM-2983:
    Fix Version/s: 5.7.2.Final

> Commit failure in WFLY LocalResource does not return error to the caller
> ------------------------------------------------------------------------
>                 Key: JBTM-2983
>                 URL: https://issues.jboss.org/browse/JBTM-2983
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>          Components: JTA
>    Affects Versions: 5.7.1.Final
>            Reporter: Ondra Chaloupka
>            Assignee: Ondra Chaloupka
>            Priority: Critical
>             Fix For: 5.7.2.Final
> In case that an exception is thrown during one-phase commit of  non-XA transaction participant the error is swallowed and not returned to the caller. When tested with WFLY the excpetion is shown in the log, the commit fails but the client thinks that everything worked well.
> The relevant part of the exception stacktrace when error on commit occurs is
> {code}
>         at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1549)
>         at org.jboss.jca.adapters.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:96)
>         at org.jboss.jca.core.tx.jbossts.LocalXAResourceImpl.commit(LocalXAResourceImpl.java:172)
>         at com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource.commit(XAOnePhaseResource.java:120)
>         at com.arjuna.ats.internal.arjuna.abstractrecords.LastResourceRecord.topLevelPrepare(LastResourceRecord.java:152)
>         at com.arjuna.ats.arjuna.coordinator.AbstractRecord.topLevelOnePhaseCommit(AbstractRecord.java:428)
>         at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2386)
>         at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1497)
> {code}
> It seems that there is issue at
> https://github.com/jbosstm/narayana/blob/master/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAOnePhaseResource.java#L164
> which does say something about recovery but for one phase nonXA there will be no recovery.
> The decision that the {{XAOnePhaseResource}} is used for the txn work is done at
> https://github.com/jbosstm/narayana/blob/master/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java#L792
> where depending how the setup of {{jtaEnvironmentBean.setLastResourceOptimisationInterfaceClassName}} was done. This is done in WFLY at
> https://github.com/wildfly/wildfly/blob/master/transactions/src/main/java/org/jboss/as/txn/service/JTAEnvironmentBeanService.java#L60

This message was sent by Atlassian JIRA

More information about the jbossts-issues mailing list