Needed to loosen locking otherwise a deadlock could occur during framework
startup. (FELIX-851)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@736089 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 0acee2a..965ee51 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -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
+}