You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fm...@apache.org on 2010/06/25 11:13:05 UTC

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

Author: fmeschbe
Date: Fri Jun 25 09:13:04 2010
New Revision: 957858

URL: http://svn.apache.org/viewvc?rev=957858&view=rev
Log:
FELIX-2240 Move initial configuration to after loading the initial plugins. This is required since the HTTP Service is now started to be tracked when the console is configured. This may cause a race condition between the Http Service being bound and built-in plugins being registered but not initialized.

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=957858&r1=957857&r2=957858&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 Fri Jun 25 09:13:04 2010
@@ -204,29 +204,6 @@ public class OsgiManager extends Generic
         this.bundleContext = bundleContext;
         this.holder = new PluginHolder( bundleContext );
 
-        securityProviderTracker = new ServiceTracker( bundleContext, WebConsoleSecurityProvider.class.getName(), null );
-        securityProviderTracker.open();
-
-        updateConfiguration( null );
-
-        try
-        {
-            this.configurationListener = ConfigurationListener2.create( this );
-        }
-        catch ( Throwable t2 )
-        {
-            // might be caused by Metatype API not available
-            // try without MetaTypeProvider
-            try
-            {
-                this.configurationListener = ConfigurationListener.create( this );
-            }
-            catch ( Throwable t )
-            {
-                // might be caused by CM API not available
-            }
-        }
-
         // setup the included plugins
         ClassLoader classLoader = getClass().getClassLoader();
         for ( int i = 0; i < PLUGIN_CLASSES.length; i++ )
@@ -295,6 +272,31 @@ public class OsgiManager extends Generic
         // accept new console branding service
         brandingTracker = new BrandingServiceTracker( this );
         brandingTracker.open();
+
+        // add support for pluggable security
+        securityProviderTracker = new ServiceTracker( bundleContext, WebConsoleSecurityProvider.class.getName(), null );
+        securityProviderTracker.open();
+
+        // configure and start listening for configuration
+        updateConfiguration( null );
+
+        try
+        {
+            this.configurationListener = ConfigurationListener2.create( this );
+        }
+        catch ( Throwable t2 )
+        {
+            // might be caused by Metatype API not available
+            // try without MetaTypeProvider
+            try
+            {
+                this.configurationListener = ConfigurationListener.create( this );
+            }
+            catch ( Throwable t )
+            {
+                // might be caused by CM API not available
+            }
+        }
     }