Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.1.2
-
None
-
None
Description
When performing Registry transactions, "beginTransaction" and "commitTransaction" methods should always be in a try block and RegistryException should be caught and rolled back by calling "rollbackTransaction" method. "rollbackTransaction" should also be in another try block and rollback exception should be properly logged.
For eg:
try
{ registryService.beginTransaction(); registryService.delete(resourcePath); registryService.commitTransaction(); } catch (RegistryException e) {
try
catch (RegistryException e1) {
if (log.isErrorEnabled())
}
String message = "Could not delete resource at " + resourcePath;
throw new AutoScalerException(message, e);
}
Buggy registry operations could result in unreleased locks.