[FELIX-2791] Defer the CM support until after trackers are open to be a bit safer
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1062842 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/FileInstall.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/FileInstall.java
index 27f889d..b024a11 100644
--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/FileInstall.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/FileInstall.java
@@ -57,16 +57,6 @@
props.put("url.handler.protocol", JarDirUrlHandler.PROTOCOL);
context.registerService(org.osgi.service.url.URLStreamHandlerService.class.getName(), new JarDirUrlHandler(), props);
- try
- {
- cmSupport = new ConfigAdminSupport(context, this);
- }
- catch (NoClassDefFoundError e)
- {
- Util.log(context, Util.getGlobalLogLevel(context), Logger.LOG_DEBUG,
- "ConfigAdmin is not available, some features will be disabled", e);
- }
-
padmin = new ServiceTracker(context, PackageAdmin.class.getName(), null);
padmin.open();
startLevel = new ServiceTracker(context, StartLevel.class.getName(), null);
@@ -89,6 +79,16 @@
};
listenersTracker.open();
+ try
+ {
+ cmSupport = new ConfigAdminSupport(context, this);
+ }
+ catch (NoClassDefFoundError e)
+ {
+ Util.log(context, Util.getGlobalLogLevel(context), Logger.LOG_DEBUG,
+ "ConfigAdmin is not available, some features will be disabled", e);
+ }
+
// Created the initial configuration
Hashtable ht = new Hashtable();