add acquire topology lock for get app info

Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/c01d963d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/c01d963d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/c01d963d

Branch: refs/heads/4.0.0-grouping
Commit: c01d963dee00f10c32180a8fc6f7d1c3a8af3afc
Parents: 061cc49
Author: Udara Liyanage <[email protected]>
Authored: Thu Oct 23 17:53:13 2014 +0530
Committer: Udara Liyanage <[email protected]>
Committed: Fri Oct 24 14:49:03 2014 +0530

----------------------------------------------------------------------
 .../org/apache/stratos/rest/endpoint/services/ServiceUtils.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/c01d963d/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
index 1bd2568..b7b5695 100644
--- 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
+++ 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
@@ -1462,6 +1462,7 @@ public class ServiceUtils {
                 Cluster topLevelCluster;
 
                 try {
+                    TopologyManager.acquireReadLockForCluster(serviceType, 
clusterId);
                     topLevelCluster = 
TopologyManager.getTopology().getService(serviceType).getCluster(clusterId);
                 }finally {
                     TopologyManager.releaseReadLockForCluster(serviceType, 
clusterId);

Reply via email to