Update the AS registry manager
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/18d9714b Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/18d9714b Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/18d9714b Branch: refs/heads/stratos-4.1.x Commit: 18d9714bc4c43023d414f84cf569544f367d6ea6 Parents: d6c6502 Author: gayangunarathne <[email protected]> Authored: Sun Dec 6 10:30:37 2015 +0530 Committer: Isuru Haththotuwa <[email protected]> Committed: Wed Dec 9 18:41:33 2015 +0530 ---------------------------------------------------------------------- .../apache/stratos/autoscaler/registry/RegistryManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/18d9714b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java index 925c4ff..343b76a 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java @@ -85,7 +85,7 @@ public class RegistryManager { return instance; } - private Object retrieve(String resourcePath) { + private synchronized Object retrieve(String resourcePath) { try { Resource resource = registryService.get(resourcePath); return resource.getContent(); @@ -99,7 +99,7 @@ public class RegistryManager { } } - private void delete(String resourcePath) { + private synchronized void delete(String resourcePath) { try { registryService.beginTransaction(); registryService.delete(resourcePath); @@ -138,7 +138,7 @@ public class RegistryManager { * @param dataObj object to be persisted. * @param resourcePath resource path to be persisted. */ - private void persist(Object dataObj, String resourcePath) throws AutoScalerException { + private synchronized void persist(Object dataObj, String resourcePath) throws AutoScalerException { try { registryService.beginTransaction();
