-
Sep 3rd, 2009, 04:19 AM
#1
Node lock and session lock token
I'm testing the Jakrabbit Spring integration and have some questions. My main actual problem is the node locking. If the lock is not session scoped I should save the lock token when the session is gone and add to the session when it is opened again. But this process seems to be quite automatic in this spring module, so how can deal with this?
This is the piece of code:
@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public void lock() {
jcrTemplate.execute(new JcrCallback() {
public Object doInJcr(Session session) throws RepositoryException {
log.info("Session: "+session.getUserID()+" - "+session);
Node root = session.getRootNode();
Node pruebas = root.getNode("pruebas");
pruebas.lock(true, false);
session.save();
return null;
}
});
}
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules