FELIX-1488 support for another use case:
  1. Create configuration pid1 with null location and set properties
  2. Install bundle locationA with ManagedServiceA pid1
  3. Install bundle locationB with ManagedServiceB pid1
  4. Uninstall bundle locationA
  ==> configuration to be assigned to locationB/pid1 service

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@805776 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java
index e3288ed..b64a910 100644
--- a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java
+++ b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java
@@ -84,7 +84,8 @@
     ConfigurationImpl( ConfigurationManager configurationManager, PersistenceManager persistenceManager,
         Dictionary properties )
     {
-        super( configurationManager, persistenceManager, ( String ) properties.remove( Constants.SERVICE_PID ), properties );
+        super( configurationManager, persistenceManager, ( String ) properties.remove( Constants.SERVICE_PID ),
+            ( String ) properties.remove( ConfigurationAdmin.SERVICE_BUNDLELOCATION ) );
 
         this.factoryPID = ( String ) properties.remove( ConfigurationAdmin.SERVICE_FACTORYPID );
         this.isDeleted = false;
@@ -97,15 +98,12 @@
     ConfigurationImpl( ConfigurationManager configurationManager, PersistenceManager persistenceManager, String pid,
         String factoryPid, String bundleLocation ) throws IOException
     {
-        super( configurationManager, persistenceManager, pid, null );
+        super( configurationManager, persistenceManager, pid, bundleLocation );
 
         this.factoryPID = factoryPid;
         this.isDeleted = false;
         this.properties = null;
 
-        // static bundle binding here
-        setStaticBundleLocation( bundleLocation );
-
         // this is a new configuration object, store immediately unless
         // the new configuration object is created from a factory, in which
         // case the configuration is only stored when first updated
@@ -123,7 +121,8 @@
     {
         this.isDeleted = true;
         getPersistenceManager().delete( this.getPid() );
-        getConfigurationManager().deleted( this, true );
+        getConfigurationManager().setDynamicBundleLocation( this.getPid(), null );
+        getConfigurationManager().deleted( this );
     }
 
 
@@ -190,7 +189,7 @@
 
             configureFromPersistence( properties );
 
-            getConfigurationManager().updated( this, true );
+            getConfigurationManager().updated( this );
         }
     }
 
@@ -241,7 +240,7 @@
             // finally assign the configuration for use
             configure( newProperties );
 
-            getConfigurationManager().updated( this, true );
+            getConfigurationManager().updated( this );
         }
     }