Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1387

Lock token not removed from session when node is removed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.4
    • None
    • jackrabbit-core
    • None

    Description

      If a node is locked with session scope and then deleted through this session (without unlocking it before),
      the lock token is still registed at the session and available through getLockTokens().

      This is a test code:

      @org.junit.Test
      public void testLock() throws Exception

      { final Node parentNode = session.getRootNode(); final Node node = parentNode.addNode("locktest", "nt:unstructured"); node.addMixin("mix:lockable"); parentNode.save(); final javax.jcr.lock.Lock lock = node.lock(true, true); String token = lock.getLockToken(); node.remove(); parentNode.save(); final List tokenList = Arrays.asList(session.getLockTokens()); assertTrue("Token is still in session", !tokenList.contains(token)); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            cziegeler Carsten Ziegeler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: