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

NodeNotFoundInParentException is thrown when unlocking a node within a transaction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.2.0.Final
    • 5.1.0.Final
    • JCR
    • None
    • 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(); }
    • 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

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            zcc39r Rustam Usmanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: