I’m using Jackrabbit/JCR 2.0.
Imagine the following scenario: I add a node, then I do a check-out on it, edit some properties and do check-in. Then I do it again.
Next, I can see in version history that versions 1.0 and 1.1 are created. How can I make it to increment always by 1, for example 1,2,3… etc.?
Also If I have node of type Version how to get to actual versioned Node (node that contains my data)?
And how can I add and get some other properties winch are version related like comment or author (user that checked in) of the version?
You have to use your own version number property so you can increment it like you want (especially if you are not in simple versionable mode).
To access the history and the properties of historised versions you have to use the VersionHisoty and get the version nodes using code like this :