stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject stratos git commit: Fixing dead lock issue in application locking in rest api
Date Sat, 13 Dec 2014 17:24:47 GMT
Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test b7c4a428c -> 1775ff77f


Fixing dead lock issue in application locking in rest api


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

Branch: refs/heads/4.1.0-test
Commit: 1775ff77ffb155b602c23a571bd3eab39e55cd2b
Parents: b7c4a42
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Sat Dec 13 22:54:17 2014 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Sat Dec 13 22:54:40 2014 +0530

----------------------------------------------------------------------
 .../stratos/rest/endpoint/api/StratosApiV41Utils.java       | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/1775ff77/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 899c2e8..0218c71 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -1101,14 +1101,7 @@ public class StratosApiV41Utils {
             String clusterId = clusterDataHolder.getClusterId();
             String serviceType = clusterDataHolder.getServiceType();
             TopologyManager.acquireReadLockForCluster(serviceType, clusterId);
-            Cluster topLevelCluster;
-
-            try {
-                TopologyManager.acquireReadLockForCluster(serviceType, clusterId);
-                topLevelCluster = TopologyManager.getTopology().getService(serviceType).getCluster(clusterId);
-            } finally {
-                TopologyManager.releaseReadLockForCluster(serviceType, clusterId);
-            }
+            Cluster topLevelCluster = TopologyManager.getTopology().getService(serviceType).getCluster(clusterId);
             applicationBean.clusters.add(PojoConverter.populateClusterPojos(topLevelCluster,
entry.getKey()));
         }
     }


Mime
View raw message