Uploaded image for project: 'WildFly Transaction Client'
  1. WildFly Transaction Client
  2. WFTC-15

Can't load recovering transaction to commit it

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • None
    • 1.0.0.Beta18
    • None

    Description

      LocalTransactionContext.getCurrent().findOrImportTransaction(xid, 0).getTransaction()
      

      The Narayana SubordinationManager importTransaction can return transactions that are recovered and so these will have a status of COMMITTING which means they can't have a sync registered.

      WFTC registers syncs:
      1. getEntryFor:258, JBossLocalTransactionProvider (org.wildfly.transaction.client.provider.jboss)
      2. transactionCreated:281, EJBSuspendHandlerService (org.jboss.as.ejb3.suspend)
      2. TransactionManagerService lambda

      It does this without checking if the TX status is committing.

      Ends up with this:

      Caused by: java.lang.IllegalStateException: ARJUNA016082: Synchronizations are not allowed! Transaction status isActionStatus.COMMITTING
      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronizationImple(TransactionImple.java:401)
      at org.wildfly.transaction.client.provider.jboss.JBossLocalTransactionProvider.registerInterposedSynchronization(JBossLocalTransactionProvider.java:176)
      at org.wildfly.transaction.client.provider.jboss.JBossLocalTransactionProvider.getEntryFor(JBossLocalTransactionProvider.java:258)
      at org.wildfly.transaction.client.provider.jboss.JBossLocalTransactionProvider$XAImporterImpl.findOrImportTransaction(JBossLocalTransactionProvider.java:589)

      We can't use our own subordinationmanager as we want to resume the TX and so doing that gets:

      Caused by: javax.transaction.InvalidTransactionException: WFTXN0002: Transaction is not a supported instance: TransactionImple < jca-subordinate, BasicAction: 0:ffff0a247413:223d3910:58b06e37:14 status: ActionStatus.RUNNING >
      at org.wildfly.transaction.client.ContextTransactionManager.resume(ContextTransactionManager.java:119)
      at org.jboss.narayana.rest.bridge.inbound.InboundBridge.start(InboundBridge.java:104)

      Attachments

        Issue Links

          Activity

            People

              dlloyd@redhat.com David Lloyd
              thjenkin@redhat.com Thomas Jenkinson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: