saveSmth(nodeName, propertyName);
throw new RuntimeException("do rollback");
}
public String saveSmth(final String nodeName, final String propertyName) {
return (String) template.execute(new JcrCallback() {
public Object doInJcr(Session session) throws RepositoryException {
Node root = session.getRootNode();
log.info("starting from root node " + root.getPath());
Node sample = root.addNode(nodeName);