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

NodeNotFoundInParentException is thrown when unlocking a node within a transaction

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.1.0.Final
    • Fix Version/s: 5.2.0.Final
    • Component/s: JCR
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Lock and unlock a node in transactional environment. E.g. in a container with default transaction management and attribute types or within an explicitly defined transaction:

          @Test
          public void shouldLockUnlockWithinTransaction() throws Exception {
              final String path = "/test";
             
              Node parent = session.getRootNode().addNode("test");
              parent.addMixin("mix:lockable");
              session.save();
      
              startTransaction();
              LockManager lockMgr = session.getWorkspace().getLockManager();
              lockMgr.lock(path, true, true, Long.MAX_VALUE, session.getUserID());
              lockMgr.unlock(path);
              commitTransaction();
      
          }
      
      
      Show
      Lock and unlock a node in transactional environment. E.g. in a container with default transaction management and attribute types or within an explicitly defined transaction: @Test public void shouldLockUnlockWithinTransaction() throws Exception { final String path = "/test" ; Node parent = session.getRootNode().addNode( "test" ); parent.addMixin( "mix:lockable" ); session.save(); startTransaction(); LockManager lockMgr = session.getWorkspace().getLockManager(); lockMgr.lock(path, true , true , Long .MAX_VALUE, session.getUserID()); lockMgr.unlock(path); commitTransaction(); }
    • Workaround Description:
      Hide

      Do not use transactions (use TransactionAttributeType.NEVER for EJB).

      Show
      Do not use transactions (use TransactionAttributeType.NEVER for EJB).

      Description

      NodeNotFoundInParentException is thrown when unlocking a node in transactional environment

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                zcc39r Rustam Usmanov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: