Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-1552

Concurrent conflicting property creation sometimes doesn't fail

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: core 1.4.2
    • Fix Version/s: None
    • Component/s: jackrabbit-core
    • Labels:
      None

      Description

      The following test prints "Success":

      Session s1 = ...
      Session s2 = ...
      s1.getRootNode().setProperty("b", "0"); // init with zero
      s1.getRootNode().setProperty("b", (String) null); // delete
      s1.save();
      s1.getRootNode().setProperty("b", "1");
      s2.getRootNode().setProperty("b", "2");
      s1.save();
      s2.save();
      System.out.println("Success");

      However if the line marked "... // delete" is commented out,
      it fails with the following exception:

      javax.jcr.InvalidItemStateException:
      cafebabe-cafe-babe-cafe-babecafebabe/{}b: the item cannot be saved
      because it has been modified externally.
      at org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:246)
      at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:928)
      at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:849)

      It should fail in all cases. If we decide it shouldn't fail, it needs to be documented.

        Activity

          People

          • Assignee:
            Stefan Guggisberg
            Reporter:
            Thomas Mueller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development