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

Node.isLocked() within a transaction returns false for a locked node

    Details

    • Steps to Reproduce:
      Hide
          @Test  
          public void shouldLockNode() throws Exception {  
               Node node = session.getRootNode().addNode("test");  
               node.addMixin("mix:lockable");  
               session.save();  
            
               startTransaction();  
               JcrLockManager lockManager = session.getWorkspace().getLockManager();  
               Lock lock = lockManager.lock(node.getPath(), false, false, Long.MAX_VALUE, null);  
               assertTrue(node.isLocked());  
               commitTransaction();  
          }  
      
      Show
      @Test public void shouldLockNode() throws Exception { Node node = session.getRootNode().addNode( "test" ); node.addMixin( "mix:lockable" ); session.save(); startTransaction(); JcrLockManager lockManager = session.getWorkspace().getLockManager(); Lock lock = lockManager.lock(node.getPath(), false , false , Long .MAX_VALUE, null ); assertTrue(node.isLocked()); commitTransaction(); }

      Gliffy Diagrams

        Attachments

          Issue Links

            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: