You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2010/03/04 21:55:48 UTC

svn commit: r919177 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java

Author: gnodet
Date: Thu Mar  4 20:55:48 2010
New Revision: 919177

URL: http://svn.apache.org/viewvc?rev=919177&view=rev
Log:
[webconsole] fix rev 903286 (FELIX-2009) which breaks again FELIX-1370 (configuration for org.apache.felix.webconsole.internal.servlet.OsgiManager is sometimes ignored)The test is wrong, as they may be other changes (such as user / password) that may affect the service, so always rebind the main servlet if there is any change

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java?rev=919177&r1=919176&r2=919177&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java Thu Mar  4 20:55:48 2010
@@ -881,28 +881,22 @@
         }
 
         // might update http service registration
-        if ( !newWebManagerRoot.equals( this.webManagerRoot ) )
+        HttpService httpService = this.httpService;
+        if ( httpService != null )
         {
-            HttpService httpService = this.httpService;
-            if ( httpService != null )
-            {
-                synchronized ( this )
-                {
-                    // unbind old location first
-                    unbindHttpService( httpService );
-
-                    // switch location
-                    this.webManagerRoot = newWebManagerRoot;
-
-                    // bind new location now
-                    bindHttpService( httpService );
-                }
-            }
-            else
-            {
-                // just set the configured location (FELIX-2034)
-                this.webManagerRoot = newWebManagerRoot;
-            }
+            // unbind old location first
+            unbindHttpService( httpService );
+
+            // switch location
+            this.webManagerRoot = newWebManagerRoot;
+
+            // bind new location now
+            bindHttpService( httpService );
+        }
+        else
+        {
+            // just set the configured location (FELIX-2034)
+            this.webManagerRoot = newWebManagerRoot;
         }
     }