jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Anstett" <tobias.anst...@iaas.uni-stuttgart.de>
Subject RE: Versioning
Date Fri, 20 Jun 2008 08:17:16 GMT
Hi, 

i worked it out using the restore method :)

By the way - is jackrabbit versioning threadsafe? I think about what
happens, if two people use the resore method at the same point of time, or
have ensure this manually by using a lock ?

-----Original Message-----
From: Tobias Anstett [mailto:tobias.anstett@iaas.uni-stuttgart.de] 
Sent: Friday, June 20, 2008 9:30 AM
To: users@jackrabbit.apache.org
Subject: Versioning

Hi,

 

i read the tutorials on the homepage, the JCR specification and the ibm
developerworks article to get a better understanding on how versioning works
in jackrabbit.

 

As far as I understood the versioning mechanism/model should support
alternative revisions.

 

First I have to created Node A and tell Jackrabbit to version it by:

Node n1 = root.addNode("A");

n1.addMixin("mix:versionable");

session.save();

Version v1 = n1.checkin();

 

The versionhistory will look like this (skipped the Vroot node):

Version: 1.0

Successors: 0

 

So far so good - then I can add some linear revisions by just getting node A
and modifying something that will result in the following version history:

Version: 1.0

Successors: 1

--------------------------

Version: 1.1

Successors: 1

--------------------------

Version: 1.2

Successors: 0

 

 

BUT what I can't figure out is, HOW I can create an alternative revision
that's predecessor is version 1.2 and ancestor 1.3 - so that I get an
versionhistory looking like:

Version: 1.0

Successors: 1

--------------------------

Version: 1.1

Successors: 1

--------------------------

Version: 1.2

Successors: 2

--------------------------

Version: 1.3

Successors: 0

--------------------------

Version: 1.3.1

Successors: 0

 

 

 

Can somebody help?

Further I'd like to know how I can checkout version 1.1 if there is already
an version 1.2 existing.

 

 

Regards Tobias



Mime
View raw message