You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ho...@apache.org on 2006/08/09 22:21:38 UTC
svn commit: r430135 -
/geronimo/branches/1.1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
Author: hogstrom
Date: Wed Aug 9 13:21:37 2006
New Revision: 430135
URL: http://svn.apache.org/viewvc?rev=430135&view=rev
Log:
GERONIMO-2269 Error after redeploy (with no version in module ID). \n\nApplied patch while the work on a blocker JIRA is being completed. This is already in trunk and 1.1.2
Modified:
geronimo/branches/1.1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
Modified: geronimo/branches/1.1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java?rev=430135&r1=430134&r2=430135&view=diff
==============================================================================
--- geronimo/branches/1.1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java (original)
+++ geronimo/branches/1.1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java Wed Aug 9 13:21:37 2006
@@ -53,6 +53,15 @@
protected final Collection repositories;
protected final Collection watchers;
+ /**
+ * When this is not null, it points to the "new" configuration that is
+ * part of an in-process reload operation. This configuration will
+ * definitely be loaded, but might not be started yet. It shold never be
+ * populated outside the scope of a reload operation.
+ */
+ private Configuration reloadingConfiguration;
+
+
public SimpleConfigurationManager(Collection stores, ArtifactResolver artifactResolver, Collection repositories) {
this(stores, artifactResolver, repositories, Collections.EMPTY_SET);
}
@@ -86,6 +95,9 @@
if(!configId.isResolved()) {
throw new IllegalArgumentException("Artifact "+configId+" is not fully resolved");
}
+ if(reloadingConfiguration != null && reloadingConfiguration.getId().equals(configId)) {
+ return true;
+ }
return configurationModel.isLoaded(configId);
}
@@ -228,6 +240,9 @@
if(!configurationId.isResolved()) {
throw new IllegalArgumentException("Artifact "+configurationId+" is not fully resolved");
}
+ if(reloadingConfiguration != null && reloadingConfiguration.getId().equals(configurationId)) {
+ return reloadingConfiguration;
+ }
return (Configuration) configurations.get(configurationId);
}
@@ -942,6 +957,7 @@
if (configurationId.equals(newConfigurationId)) {
newConfiguration = configuration;
+ reloadingConfiguration = configuration;
} else {
loadedParents.put(configurationId, configuration);
}
@@ -1049,7 +1065,7 @@
configuration = load(existingUnloadedConfiguration.getConfigurationData(),
existingUnloadedConfiguration.getResolvedParentIds(),
Collections.EMPTY_MAP);
-
+ reloadingConfiguration = configuration;
// if the configuration was started before restart it
if (started.contains(existingConfigurationId)) {
start(configuration);
@@ -1081,6 +1097,8 @@
throw new LifecycleException("reload", newConfigurationId, results);
}
+ } finally {
+ reloadingConfiguration = null;
}
}
@@ -1113,6 +1131,7 @@
if (resolvedParentIds != null) {
monitor.loading(configurationId);
configuration = load(unloadedConfiguration.getConfigurationData(), resolvedParentIds, Collections.EMPTY_MAP);
+ reloadingConfiguration = configuration;
monitor.succeeded(configurationId);
@@ -1163,6 +1182,8 @@
skip.add(failedId);
}
+ } finally {
+ reloadingConfiguration = null;
}
}