FELIX-1488 dynamic binding must not be removed before initiating the
configuration deletion callback, otherwise the callback does not
take place.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@805678 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
index 6d15ae8..1defa50 100644
--- a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
+++ b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
@@ -1473,16 +1473,19 @@
private class DeleteConfiguration implements Runnable
{
- private ConfigurationImpl config;
- private String pid;
- private String factoryPid;
+ private final String pid;
+ private final String factoryPid;
+ private final String configLocation;
DeleteConfiguration( ConfigurationImpl config )
{
- this.config = config;
this.pid = config.getPid();
this.factoryPid = config.getFactoryPid();
+ this.configLocation = config.getBundleLocation();
+
+ // immediately unbind the configuration
+ config.setDynamicBundleLocation( null );
}
@@ -1490,8 +1493,6 @@
{
try
{
- final String configLocation = config.getBundleLocation();
-
if ( factoryPid == null )
{
ServiceReference[] srList = bundleContext.getServiceReferences( ManagedService.class.getName(), "("