I\'m just starting to work with JCR (apache jackrabbit), i want to ask simple question (because i coudn\'t find good tutorial for it): So for what do i need Node.checkout and No
In Jackrabbit 2.x, the methods on Node are deprecated. Instead, use VersionManager.checkout / checkin (they are available in Jackrabbit 1.x as well). Here is some sample code:
Node test = s.getRootNode().addNode("test");
Node t1 = test.addNode("t1");
t1.addMixin("mix:versionable");
s.save();
VersionManager vm = s.getWorkspace().
getVersionManager();
vm.checkout("/test/t1");
t1.setProperty("data", "Hello" + i);
s.save();
vm.checkin("/test/t1");