cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r158074 - in cocoon/trunk/src: core/java/org/apache/cocoon/core/container/CoreServiceManager.java java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
Date Fri, 18 Mar 2005 14:46:42 GMT
Author: cziegeler
Date: Fri Mar 18 06:46:39 2005
New Revision: 158074

URL: http://svn.apache.org/viewcvs?view=rev&rev=158074
Log:
Filter configuration before it is passed to the service manager

Modified:
    cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java
    cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java

Modified: cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java?view=diff&r1=158073&r2=158074
==============================================================================
--- cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java (original)
+++ cocoon/trunk/src/core/java/org/apache/cocoon/core/container/CoreServiceManager.java Fri
Mar 18 06:46:39 2005
@@ -627,9 +627,7 @@
 
             final String componentName = componentConfig.getName();
 
-            if ("classpath".equals(componentName)) {
-                // Ignore
-            } else if ("include".equals(componentName)) {
+            if ("include".equals(componentName)) {
                 handleInclude(contextURI, loadedURIs, componentConfig);
 
             } else {

Modified: cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java?view=diff&r1=158073&r2=158074
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
Fri Mar 18 06:46:39 2005
@@ -24,6 +24,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.avalon.framework.configuration.AbstractConfiguration;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
@@ -108,7 +109,18 @@
             // Go through the component lifecycle
             ContainerUtil.enableLogging(newManager, this.getLogger());
             ContainerUtil.contextualize(newManager, context);
-            ContainerUtil.configure(newManager, config);
+            // before we pass the configuration we have to strip the
+            // additional configuration parts, like classpath etc. as these
+            // are not configurations for the service manager
+            final DefaultConfiguration c = new DefaultConfiguration(config.getName(), 
+                                                                    config.getLocation(),
+                                                                    config.getNamespace(),
+                                                                    "");
+            c.addAll(config);
+            c.removeChild(config.getChild("application-container"));
+            c.removeChild(config.getChild("classpath"));
+
+            ContainerUtil.configure(newManager, c);
             ContainerUtil.initialize(newManager);
 
             // check for an application specific container



Mime
View raw message