You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by dj...@apache.org on 2015/01/06 17:24:44 UTC
svn commit: r1649864 -
/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
Author: djencks
Date: Tue Jan 6 16:24:43 2015
New Revision: 1649864
URL: http://svn.apache.org/r1649864
Log:
FELIX-4753 fix startup timing issue, patch thanks to Thomas Watson
Modified:
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java?rev=1649864&r1=1649863&r2=1649864&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java Tue Jan 6 16:24:43 2015
@@ -127,11 +127,16 @@ public class ScrConfiguration
props.put(Constants.SERVICE_PID, PID);
props.put(Constants.SERVICE_DESCRIPTION, "SCR Configurator");
props.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
+
+
+ // Process configure from bundle context properties so they can be predictably
+ // overriden by configuration admin later.
+ // Note that if the managed service is registered first then it is random which will win since
+ // configuration may be delivered asynchronously
+ configure( null, false );
+
managedService = ( ServiceRegistration<ManagedService> ) bundleContext.registerService("org.osgi.service.cm.ManagedService", new ScrManagedServiceServiceFactory(this),
props);
-
- // configure from bundle context properties
- configure( null, false );
}
public void stop() {