Details

      Description

      The CacheableLockManager must be part of the transaction when we save a transaction that is why the method CacheableLockManager.isTXAware() returns true. However, it is not sufficient because we need to:

      1. Set the TransactionManager berfore creating the cache as below:
      if (transactionManager != null)

      { cache.getConfiguration().getRuntimeConfig().setTransactionManager(transactionManager); }

      this.cache.create();
      this.cache.start();

      The transaction manager cans be retrieved thanks to the TransactionService if it has been defined by calling transactionService.getTransactionManager(), if the TransactionService doesn't exist you can get it from the WorkspaceStorageCache as below:
      if (cache instanceof JBossCacheWorkspaceStorageCache)

      { transactionManager = ((JBossCacheWorkspaceStorageCache)cache).getTransactionManager(); }

      else

      { transactionManager = null; }

      2. The second thing to do is to sort the node identifiers in CacheableLockManager.onSaveItems before calling internalLock and internalUnLock to prevent deadlocks

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                areshetnyak Alex Reshetnyak
                Reporter:
                nfilotto Nicolas Filotto
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d