Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2050

ModeShape configured without client transactions cannot persist data in multi-threaded environment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 3.6.0.Final, 3.3.x-prod-ip6.0
    • 3.4.0.Final, 3.5.0.Final
    • None
    • None

    Description

      When a repository is configured with transactionMode:none and ISPN uses a transaction manager which relies on thread-local data for transaction storage (e.g. DummyTransactionManagerLookup, the following exception may occur when attempting to persist data:

      Caused by: org.modeshape.common.SystemFailureException: java.lang.IllegalStateException: no transaction associated with thread
      	at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:673)
      	at org.modeshape.jcr.JcrSession.save(JcrSession.java:1118)
      	... 33 more
      Caused by: java.lang.IllegalStateException: no transaction associated with thread
      	at org.infinispan.transaction.tm.DummyBaseTransactionManager.rollback(DummyBaseTransactionManager.java:124)
      	at org.modeshape.jcr.txn.Transactions$SimpleTransaction.rollback(Transactions.java:289)
      	at org.modeshape.jcr.txn.Transactions$TraceableSimpleTransaction.rollback(Transactions.java:314)
      	at org.modeshape.jcr.txn.NoClientTransactions$NoClientTransaction.rollback(NoClientTransactions.java:91)
      	at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:636)
      	... 34 more
      

      The reason is the fact that the current NoClientTransactions implementation uses a global counter instead of a thread-local counter for determining nested levels.

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            hchiorean Horia Chiorean (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: