Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-8853

Registering interposed synchronization fails in async operation with implicit transaction

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.2.1.Final
    • 9.2.0.Final
    • Core, Transactions
    • None

      TransactionTable.enlist calls transactionSynchronizationRegistry.registerInterposedSynchronization(sync); but when an async operation is invoked with implicit transaction, the thread-local transaction is suspended. That can result in

      java.lang.NullPointerException
      	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
      	at org.jboss.as.txn.service.internal.tsr.TransactionSynchronizationRegistryWrapper.registerInterposedSynchronization(TransactionSynchronizationRegistryWrapper.java:69)
      

      I guess that since TransactionSynchronizationRegistry does not offer a variant that would accept the transaction as parameter we need to wrap the call with resume & suspend.

              rvansa1@redhat.com Radim Vansa (Inactive)
              rvansa1@redhat.com Radim Vansa (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: