stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isu...@apache.org
Subject git commit: removing synchronization in releaseWriteLockForApplication and acquireWriteLockForApplication
Date Thu, 09 Oct 2014 04:50:42 GMT
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 <isuruh@apache.org>
Authored: Thu Oct 9 10:19:57 2014 +0530
Committer: Isuru Haththotuwa <isuruh@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");


Mime
View raw message