FELIX-4387 Get configuration early in the constructor before registering
   services to make sure to get proper updates.
   (Thanks Tobias Bocanegra for providing the patch)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1558623 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java b/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java
index 877e793..f62b3e8 100644
--- a/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java
+++ b/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java
@@ -117,6 +117,8 @@
     public ConfigSpiOsgi(BundleContext context, Logger log) throws ConfigurationException {
         this.context = context;
         this.log = log;
+        this.originalConfig = getGlobalConfiguration();
+        this.proxyConfig = new DelegatingConfiguration(osgiConfig, originalConfig);
 
         updated(getDefaultConfig());
         this.tracker = new ServiceTracker(context, LoginModuleFactory.class.getName(),
@@ -131,9 +133,6 @@
         //TODO Should this registration be made conditional i.e. service is only registered
         //only if there active LoginModules present
         this.context.registerService(LoginContextFactory.class.getName(), this, new Properties());
-
-        this.originalConfig = getGlobalConfiguration();
-        this.proxyConfig = new DelegatingConfiguration(osgiConfig, originalConfig);
     }
 
     @Override