My problematic code is like this:

 

VersionManager vm = getSession().getWorkspace().getVersionManager();


vm.checkout(path);                  

doMyVersioning();

 

// I have to same before checking in, what if checkin failed? How can I
rollback?

getSession().save();                

 

Version v = vm.checkin(path);

 

 

From: Niu, Xuetao 
Sent: Thursday, July 01, 2010 1:08 PM
To: [email protected]
Subject: Transactional versioning examples?

 

Hello,

 

I failed finding any transaction examples of using Jackrabbit2.0. Could
any of you provide one?

 

I need to have versioning behaviors transactional. My problem is that
before I checkout a node, I need to first save the current session. But
what if the checkin failed after my changes are saved? How can I
rollback the previously saved session changes?

 

Thanks a lot!

Xuetao

Reply via email to