Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2013-08-19 19:36:55 +0000
committerThomas Watson2013-08-19 19:36:55 +0000
commit7e2584a55df25931c9953369ed2c55b8eb76ef6d (patch)
tree5a30d828e9b02cf5e3412aecaaf70feecb005774 /bundles/org.eclipse.equinox.cm/src
parentf48da5275ec3112c07f84e38efddd3765240adc5 (diff)
downloadrt.equinox.bundles-7e2584a55df25931c9953369ed2c55b8eb76ef6d.tar.gz
rt.equinox.bundles-7e2584a55df25931c9953369ed2c55b8eb76ef6d.tar.xz
rt.equinox.bundles-7e2584a55df25931c9953369ed2c55b8eb76ef6d.zip
Correctly bind when getting a configuration
Diffstat (limited to 'bundles/org.eclipse.equinox.cm/src')
-rw-r--r--bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationAdminImpl.java4
-rw-r--r--bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java4
-rw-r--r--bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationStore.java8
3 files changed, 9 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationAdminImpl.java b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationAdminImpl.java
index 5c3ddf04..5b92d031 100644
--- a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationAdminImpl.java
+++ b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationAdminImpl.java
@@ -57,9 +57,9 @@ class ConfigurationAdminImpl implements ConfigurationAdmin {
ConfigurationImpl config;
if (factory) {
- config = configurationStore.createFactoryConfiguration(pid, location);
+ config = configurationStore.createFactoryConfiguration(pid, location, bind);
} else {
- config = configurationStore.getConfiguration(pid, location);
+ config = configurationStore.getConfiguration(pid, location, bind);
}
String configLocation = config.getLocation();
diff --git a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
index fcda0a71..8c59be38 100644
--- a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
+++ b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
@@ -48,13 +48,14 @@ class ConfigurationImpl implements Configuration {
/** @GuardedBy this*/
private Object storageToken;
- public ConfigurationImpl(ConfigurationAdminFactory configurationAdminFactory, ConfigurationStore configurationStore, String factoryPid, String pid, String bundleLocation) {
+ public ConfigurationImpl(ConfigurationAdminFactory configurationAdminFactory, ConfigurationStore configurationStore, String factoryPid, String pid, String bundleLocation, boolean bind) {
this.configurationAdminFactory = configurationAdminFactory;
this.configurationStore = configurationStore;
this.factoryPid = factoryPid;
this.pid = pid;
this.bundleLocation = bundleLocation;
this.changeCount = 0;
+ this.bound = bind;
}
public ConfigurationImpl(ConfigurationAdminFactory configurationAdminFactory, ConfigurationStore configurationStore, Dictionary<String, ?> dictionary, Object storageToken) {
@@ -157,6 +158,7 @@ class ConfigurationImpl implements Configuration {
e.printStackTrace();
}
configurationAdminFactory.notifyLocationChanged(this, callerLocation, factoryPid != null);
+ configurationAdminFactory.dispatchEvent(ConfigurationEvent.CM_LOCATION_CHANGED, factoryPid, pid);
}
} finally {
unlock();
diff --git a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationStore.java b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationStore.java
index 643bbb6f..fe69d81f 100644
--- a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationStore.java
+++ b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationStore.java
@@ -162,18 +162,18 @@ class ConfigurationStore {
configFile.delete();
}
- public synchronized ConfigurationImpl getConfiguration(String pid, String location) {
+ public synchronized ConfigurationImpl getConfiguration(String pid, String location, boolean bind) {
ConfigurationImpl config = configurations.get(pid);
if (config == null) {
- config = new ConfigurationImpl(configurationAdminFactory, this, null, pid, location);
+ config = new ConfigurationImpl(configurationAdminFactory, this, null, pid, location, bind);
configurations.put(pid, config);
}
return config;
}
- public synchronized ConfigurationImpl createFactoryConfiguration(String factoryPid, String location) {
+ public synchronized ConfigurationImpl createFactoryConfiguration(String factoryPid, String location, boolean bind) {
String pid = factoryPid + "-" + new Date().getTime() + "-" + createdPidCount++; //$NON-NLS-1$ //$NON-NLS-2$
- ConfigurationImpl config = new ConfigurationImpl(configurationAdminFactory, this, factoryPid, pid, location);
+ ConfigurationImpl config = new ConfigurationImpl(configurationAdminFactory, this, factoryPid, pid, location, bind);
configurations.put(pid, config);
return config;
}

Back to the top