You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/10/09 06:50:42 UTC

git commit: removing synchronization in releaseWriteLockForApplication and acquireWriteLockForApplication

Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping cff0ace65 -> bdca0f252


removing synchronization in releaseWriteLockForApplication and acquireWriteLockForApplication


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

Branch: refs/heads/4.0.0-grouping
Commit: bdca0f2521b384a4daa6430aba1368b27510c5aa
Parents: cff0ace
Author: Isuru Haththotuwa <is...@apache.org>
Authored: Thu Oct 9 10:19:57 2014 +0530
Committer: Isuru Haththotuwa <is...@apache.org>
Committed: Thu Oct 9 10:20:28 2014 +0530

----------------------------------------------------------------------
 .../messaging/message/receiver/topology/TopologyManager.java     | 4 ++--
 .../stratos/messaging/topology/locking/TopologyLockingTest.java  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/bdca0f25/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java
index e86d9df..e39351f 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java
@@ -464,7 +464,7 @@ public class TopologyManager {
      *
      * @param appId Application id
      */
-    public static synchronized void acquireWriteLockForApplication (String appId) {
+    public static void acquireWriteLockForApplication (String appId) {
 
         // acquire read lock for all Applications
         acquireReadLockForApplications();
@@ -487,7 +487,7 @@ public class TopologyManager {
      *
      * @param appId Application id
      */
-    public static synchronized void releaseWriteLockForApplication (String appId) {
+    public static void releaseWriteLockForApplication (String appId) {
 
         TopologyLock topologyAppLock = topologyLockHierarchy.getTopologyLockForApplication(appId);
         if (topologyAppLock == null)  {

http://git-wip-us.apache.org/repos/asf/stratos/blob/bdca0f25/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
index 88b47f9..cde7b47 100644
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
+++ b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
@@ -185,7 +185,7 @@ public class TopologyLockingTest {
         TopologyManager.releaseWriteLockForApplication("app1");
     }
 
-    @Test
+    @Test(timeout=10000)
     public void testAcquireAndReleaseReadLockForApp2 () {
 
         TopologyManager.acquireReadLockForApplication("app2");