felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r736089 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Date Tue, 20 Jan 2009 20:24:54 GMT
Author: rickhall
Date: Tue Jan 20 12:24:54 2009
New Revision: 736089

URL: http://svn.apache.org/viewvc?rev=736089&view=rev
Log:
Needed to loosen locking otherwise a deadlock could occur during framework
startup. (FELIX-851)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=736089&r1=736088&r2=736089&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Tue Jan 20 12:24:54
2009
@@ -91,7 +91,7 @@
     private final Object[] m_uninstalledBundlesLock_Priority3 = new Object[0];
 
     // Framework's active start level.
-    private int m_activeStartLevel = FelixConstants.FRAMEWORK_INACTIVE_STARTLEVEL;
+    private volatile int m_activeStartLevel = FelixConstants.FRAMEWORK_INACTIVE_STARTLEVEL;
 
     // Local file system cache.
     private BundleCache m_cache = null;
@@ -796,7 +796,7 @@
      * implements functionality for the Start Level service.
      * @return The active start level of the framework.
     **/
-    synchronized int getActiveStartLevel()
+    int getActiveStartLevel()
     {
         return m_activeStartLevel;
     }
@@ -839,14 +839,10 @@
         // for two requests to change the framework's start level to interfere
         // with each other.
 
-        boolean lowering;
-        synchronized (this)
-        {
-            // Determine if we are lowering or raising the
-            // active start level, then udpate active start level.
-            lowering = (requestedLevel < getActiveStartLevel());
-            m_activeStartLevel = requestedLevel;
-        }
+        // Determine if we are lowering or raising the
+        // active start level, then udpate active start level.
+        boolean lowering = (requestedLevel < getActiveStartLevel());
+        m_activeStartLevel = requestedLevel;
 
         synchronized (m_installedBundleLock_Priority2)
         {
@@ -4282,4 +4278,4 @@
             m_bundleLock.notifyAll();
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message