// ready for restore
VersionDelegate vd = versionManagerDelegate.getVersionByIdentifier(
version.getIdentifier());
versionManagerDelegate.restore(
parent, PathUtils.getName(oakPath), vd);
sessionDelegate.commit();
success = true;
} catch (CommitFailedException e) {
throw e.asRepositoryException();
} finally {
if (!success) {