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

Removal of a node with shared subnodes fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-alpha7
    • 2.0-alpha9
    • jackrabbit-core
    • None

    Description

      A simple testcase:

      Set up (first transaction):
      Node a1 = testRootNode.addNode("a1");
      Node a2 = testRootNode.addNode("a2");
      a2.addMixin("mix:shareable");
      session.save();
      // now we have a shareable node N with path a2

      Workspace workspace = session.getWorkspace();
      String path = a1.getPath() + "/b1";
      workspace.clone(workspace.getName(), a2.getPath(), path, false);
      session.save();
      // now we have another shareable node N' in the same shared set as N with path a1/b1

      Test(second transaction):
      testRootNode.remove("a1");
      session.save();

      At least in a transactional repository the node will not be removed, an error will be thrown instead.

      Attachments

        1. EventStateCollection.java.patch
          2 kB
          Lars Michele
        2. SessionItemStateManager.java.patch
          0.9 kB
          Lars Michele
        3. SessionItemStateManager.java.patch
          1 kB
          Lars Michele
        4. ShareableNodeTest.java.patch
          1 kB
          Lars Michele
        5. JCR-2257.patch
          4 kB
          Marcel Reutegger

        Activity

          People

            Unassigned Unassigned
            lmichele Lars Michele
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: