UserRegistry registry = initRegistry();
try {
registry.beginTransaction();
registry.delete(resourcePath);
registry.commitTransaction();
} catch (RegistryException e) {
String errorMsg = "Could not delete resource at "+ resourcePath;
log.error(errorMsg, e);
// rollback