cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r492569 - in /cocoon/trunk: core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/ core/cocoon-sitemap/cocoon-sitemap-impl/src/m...
Date Thu, 04 Jan 2007 13:59:30 GMT
Author: cziegeler
Date: Thu Jan  4 05:59:29 2007
New Revision: 492569

URL: http://svn.apache.org/viewvc?view=rev&rev=492569
Log:
Rename Avalon element to "bridge"
Remove log4j from avalon bridge

Added:
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/BridgeElementParser.java
      - copied, changed from r492462, cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java
Removed:
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java
Modified:
    cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonLoggerFactoryBean.java
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonNamespaceHandler.java
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/org/apache/cocoon/core/container/spring/avalon/avalon.xsd
    cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/applicationContext.xml
    cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/cocoon/log4j.xconf
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/resources/org/apache/cocoon/maven/deployer/monolithic/WEB-INF/applicationContext.xml
    cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml

Modified: cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
Thu Jan  4 05:59:29 2007
@@ -41,7 +41,7 @@
 import org.apache.cocoon.AbstractTestCase;
 import org.apache.cocoon.Constants;
 import org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor;
-import org.apache.cocoon.core.container.spring.avalon.AvalonElementParser;
+import org.apache.cocoon.core.container.spring.avalon.BridgeElementParser;
 import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.cocoon.core.container.spring.avalon.ConfigurationInfo;
 import org.apache.cocoon.core.container.spring.avalon.ConfigurationReader;
@@ -389,7 +389,7 @@
         return this.getComponent(classname, null, null);
     }
 
-    protected static class AvalonInstantiator extends AvalonElementParser {
+    protected static class AvalonInstantiator extends BridgeElementParser {
 
         protected final Map properties;
 
@@ -404,9 +404,9 @@
         }
 
         /**
-         * @see org.apache.cocoon.core.container.spring.avalon.AvalonElementParser#addLogger(java.lang.String,
org.springframework.beans.factory.support.BeanDefinitionRegistry, java.lang.String)
+         * @see org.apache.cocoon.core.container.spring.avalon.BridgeElementParser#addLogger(org.springframework.beans.factory.support.BeanDefinitionRegistry,
java.lang.String)
          */
-        protected void addLogger(String configuration, BeanDefinitionRegistry registry, String
loggerCategory) {
+        protected void addLogger(BeanDefinitionRegistry registry, String loggerCategory)
{
             this.addComponent(ConsoleLogger.class, AvalonUtils.LOGGER_ROLE, null, false,
registry);
         }
     }

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonLoggerFactoryBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonLoggerFactoryBean.java?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonLoggerFactoryBean.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonLoggerFactoryBean.java
Thu Jan  4 05:59:29 2007
@@ -16,23 +16,10 @@
  */
 package org.apache.cocoon.core.container.spring.avalon;
 
-import java.io.File;
-import java.net.URL;
-
-import javax.servlet.ServletContext;
-
-import org.apache.avalon.excalibur.logger.Log4JConfLoggerManager;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.context.DefaultContext;
 import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.configuration.Settings;
 import org.apache.cocoon.util.avalon.CLLoggerWrapper;
-import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.FactoryBean;
-import org.springframework.web.context.ServletContextAware;
 
 /**
  * Spring factory bean to setup the Avalon logger.
@@ -41,79 +28,16 @@
  * @version $Id$
  */
 public class AvalonLoggerFactoryBean
-    implements FactoryBean, ServletContextAware {
-
-    /** Logger (we use the same logging mechanism as Spring!) */
-    protected final Log log = LogFactory.getLog(getClass());
-
-    /** The servlet context. */
-    protected ServletContext servletContext;
-
-    /** The settings. */
-    protected Settings settings;
-
-    protected Logger logger;
-
-    /** The logging configuration. */
-    protected String configuration;
+    implements FactoryBean {
 
     /** The logging category. */
-    protected String category;
-
-    /**
-     * @see org.springframework.web.context.ServletContextAware#setServletContext(javax.servlet.ServletContext)
-     */
-    public void setServletContext(ServletContext sContext) {
-        this.servletContext = sContext;
-    }
-
-    protected void init()
-    throws Exception {
-        // create log directory
-        final File logSCDir = new File(settings.getWorkDirectory(), "cocoon-logs");
-        logSCDir.mkdirs();
-
-        // create an own context for the logger manager
-        final DefaultContext subcontext = new SettingsContext(settings);
-        subcontext.put("context-work", new File(settings.getWorkDirectory()));
-        subcontext.put("log-dir", logSCDir.toString());
-        subcontext.put("servlet-context", servletContext);
-
-        final Log4JConfLoggerManager loggerManager = new Log4JConfLoggerManager();
-        loggerManager.enableLogging(new CLLoggerWrapper(this.log));
-        loggerManager.contextualize(subcontext);
-
-        // Configure the log4j manager
-        String loggerConfig = this.configuration;
-        if ( loggerConfig != null && !loggerConfig.startsWith("/") ) {
-            loggerConfig = '/' + loggerConfig;
-        }
-        if ( loggerConfig != null ) {
-            final URL url = servletContext.getResource(loggerConfig);
-            if ( url != null ) {
-                final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(true);
-                final Configuration conf = builder.build(servletContext.getResourceAsStream(loggerConfig));
-                loggerManager.configure(conf);
-            } else {
-                this.log.warn("The logging configuration '" + loggerConfig + "' is not available.");
-                loggerManager.configure(new DefaultConfiguration("empty"));
-            }
-        } else {
-            loggerManager.configure(new DefaultConfiguration("empty"));
-        }
-
-        String loggingCategory = this.category;
-        if ( loggingCategory == null ) {
-            loggingCategory = "cocoon";
-        }
-        this.logger = loggerManager.getLoggerForCategory(loggingCategory);
-    }
+    protected String category = "cocoon";
 
     /**
      * @see org.springframework.beans.factory.FactoryBean#getObject()
      */
     public Object getObject() throws Exception {
-        return this.logger;
+        return new CLLoggerWrapper(LogFactory.getLog(this.category));
     }
 
     /**
@@ -128,14 +52,6 @@
      */
     public boolean isSingleton() {
         return true;
-    }
-
-    public void setSettings(Settings settings) {
-        this.settings = settings;
-    }
-
-    public void setConfiguration(String loggingConfiguration) {
-        this.configuration = loggingConfiguration;
     }
 
     public void setCategory(String category) {

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonNamespaceHandler.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonNamespaceHandler.java?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonNamespaceHandler.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonNamespaceHandler.java
Thu Jan  4 05:59:29 2007
@@ -20,7 +20,7 @@
 
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.cocoon.core.container.spring.avalon.AvalonElementParser;
+import org.apache.cocoon.core.container.spring.avalon.BridgeElementParser;
 import org.apache.cocoon.util.location.Location;
 import org.apache.cocoon.util.location.LocationImpl;
 import org.apache.cocoon.util.location.LocationUtils;
@@ -30,8 +30,8 @@
  * Spring namespace handler for the cocoon avalon namespace.
  * Currently this namespace defines the following elements
  * (in the namespace "http://cocoon.apache.org/schema/avalon"):
- * "avalon" : This adds all Avalon configured components to the bean factory.
- *            (Attribute location is required)
+ * "bridge" : This adds all Avalon configured components to the bean factory.
+ * "sitemap":
  *
  * @version $Id$
  * @since 2.2
@@ -76,7 +76,7 @@
      * @see org.springframework.beans.factory.xml.NamespaceHandler#init()
      */
     public void init() {
-        registerBeanDefinitionParser("avalon", new AvalonElementParser());
+        registerBeanDefinitionParser("bridge", new BridgeElementParser());
         registerBeanDefinitionParser("sitemap", new SitemapElementParser());
     }
 }

Copied: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/BridgeElementParser.java
(from r492462, cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/BridgeElementParser.java?view=diff&rev=492569&p1=cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java&r1=492462&p2=cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/BridgeElementParser.java&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/BridgeElementParser.java
Thu Jan  4 05:59:29 2007
@@ -56,7 +56,7 @@
  * @version $Id$
  * @since 2.2
  */
-public class AvalonElementParser extends AbstractElementParser {
+public class BridgeElementParser extends AbstractElementParser {
     public static final String DEFAULT_COCOON_XCONF_LOCATION = "resource://org/apache/cocoon/cocoon.xconf";
     
     /**
@@ -105,8 +105,7 @@
                 registry);
 
         // add logger
-        final String loggingConfiguration = (element == null ? null : element.getAttribute("loggingConfiguration"));
-        this.addLogger(loggingConfiguration, registry, info.getRootLogger());
+        this.addLogger(registry, info.getRootLogger());
 
         // handle includes of spring configurations
         final Iterator includeIter = info.getImports().iterator();
@@ -150,22 +149,16 @@
 
     /**
      * Add the logger bean.
-     * @param configuration  The location of the logging configuration.
      * @param registry       The bean registry.
      * @param loggerCategory The optional category for the logger.
      */
-    protected void addLogger(String                 configuration,
-                             BeanDefinitionRegistry registry,
+    protected void addLogger(BeanDefinitionRegistry registry,
                              String                 loggerCategory) {
-        // we only add the logger if the configuration is present
-        if ( configuration != null && configuration.trim().length() > 0 ) {
-            final RootBeanDefinition beanDef = this.createBeanDefinition(AvalonLoggerFactoryBean.class,
"init", true);
-            beanDef.getPropertyValues().addPropertyValue("configuration", configuration);
-            if ( loggerCategory != null ) {
-                beanDef.getPropertyValues().addPropertyValue("category", loggerCategory);
-            }
-            this.register(beanDef, AvalonUtils.LOGGER_ROLE, registry);
+        final RootBeanDefinition beanDef = this.createBeanDefinition(AvalonLoggerFactoryBean.class,
null, false);
+        if ( loggerCategory != null ) {
+            beanDef.getPropertyValues().addPropertyValue("category", loggerCategory);
         }
+        this.register(beanDef, AvalonUtils.LOGGER_ROLE, registry);
     }
 
     public void createConfig(ConfigurationInfo      info,

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
Thu Jan  4 05:59:29 2007
@@ -28,10 +28,10 @@
  * @version $Id$
  * @since 2.2
  */
-public class SitemapElementParser extends AvalonElementParser {
+public class SitemapElementParser extends BridgeElementParser {
 
     /**
-     * @see org.apache.cocoon.core.container.spring.avalon.AvalonElementParser#addContext(org.w3c.dom.Element,
org.springframework.beans.factory.support.BeanDefinitionRegistry)
+     * @see org.apache.cocoon.core.container.spring.avalon.BridgeElementParser#addContext(org.w3c.dom.Element,
org.springframework.beans.factory.support.BeanDefinitionRegistry)
      */
     protected void addContext(Element element, BeanDefinitionRegistry registry) {
         // we get the uriPrefix from the configuration
@@ -45,12 +45,10 @@
 
     /**
      * Add the logger bean.
-     * @param configuration  The location of the logging configuration.
      * @param registry       The bean registry.
      * @param loggerCategory The optional category for the logger.
      */
-    protected void addLogger(String                 configuration,
-                             BeanDefinitionRegistry registry,
+    protected void addLogger(BeanDefinitionRegistry registry,
                              String                 loggerCategory) {
         final RootBeanDefinition beanDef = this.createBeanDefinition(AvalonChildLoggerFactoryBean.class,
"init", false);
         if ( loggerCategory != null ) {
@@ -60,7 +58,7 @@
     }
 
     /**
-     * @see org.apache.cocoon.core.container.spring.avalon.AvalonElementParser#readConfiguration(java.lang.String,
org.springframework.core.io.ResourceLoader)
+     * @see org.apache.cocoon.core.container.spring.avalon.BridgeElementParser#readConfiguration(java.lang.String,
org.springframework.core.io.ResourceLoader)
      */
     protected ConfigurationInfo readConfiguration(String location, ResourceLoader resourceLoader)
     throws Exception {

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/org/apache/cocoon/core/container/spring/avalon/avalon.xsd
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/org/apache/cocoon/core/container/spring/avalon/avalon.xsd?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/org/apache/cocoon/core/container/spring/avalon/avalon.xsd
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/org/apache/cocoon/core/container/spring/avalon/avalon.xsd
Thu Jan  4 05:59:29 2007
@@ -24,7 +24,6 @@
 
     <xsd:complexType name="avalonType">
     	<xsd:attribute name="location" type="xsd:string" use="optional"/>
-    	<xsd:attribute name="loggingConfiguration" type="xsd:string" use="optional"/>
     </xsd:complexType>
 
     <xsd:complexType name="sitemapType">

Modified: cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/applicationContext.xml?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/applicationContext.xml Thu Jan
 4 05:59:29 2007
@@ -29,13 +29,13 @@
   <!-- Activate Cocoon Spring Configurator -->
   <configurator:settings/>
 
-  <!-- Load Avalon configurations
-       If you want to use a different logger than the default log4j logger,
-       add a bean conforming to the Avalon Logger interface to this definition
-       and leave out the loggingConfiguration attribute.
-       If you have an own cocoon.xconf specify the location attribute,
-       like location="/WEB-INF/cocoon/cocoon.xconf".
-   -->
-  <avalon:avalon loggingConfiguration="/WEB-INF/cocoon/log4j.xconf"/>
+  <bean name="org.apache.cocoon.spring.configurator.log4j"
+        class="org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator"
+        scope="singleton">
+    <property name="resource" value="/WEB-INF/cocoon/log4j.xconf"/>
+  </bean>
+
+  <!-- Load Avalon configurations -->
+  <avalon:bridge/>
 
 </beans>

Modified: cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/cocoon/log4j.xconf
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/cocoon/log4j.xconf?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/cocoon/log4j.xconf (original)
+++ cocoon/trunk/core/cocoon-webapp/src/main/webapp/WEB-INF/cocoon/log4j.xconf Thu Jan  4
05:59:29 2007
@@ -23,7 +23,7 @@
          Note, that you can use properties for value substitution.
     -->
     <appender name="COCOON_DEFAULT" class="org.apache.log4j.FileAppender">
-        <param name="File"   value="${log-dir}/log4j.log" />
+        <param name="File"   value="${org.apache.cocoon.work.directory}/cocoon-logs/log4j.log"
/>
         <param name="Append" value="false" />	    	
         <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>

Modified: cocoon/trunk/tools/archetypes/cocoon-22-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml
(original)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml
Thu Jan  4 05:59:29 2007
@@ -29,13 +29,13 @@
   <!-- Activate Cocoon Spring Configurator -->
   <configurator:settings/>
 
-  <!-- Load Avalon configurations
-       If you want to use a different logger than the default log4j logger,
-       add a bean conforming to the Avalon Logger interface to this definition
-       and leave out the loggingConfiguration attribute.
-       If you have an own cocoon.xconf specify the location attribute,
-       like location="/WEB-INF/cocoon/cocoon.xconf".
-   -->
-  <avalon:avalon loggingConfiguration="/WEB-INF/log4j.xml"/>
+  <bean name="org.apache.cocoon.spring.configurator.log4j"
+        class="org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator"
+        scope="singleton">
+    <property name="resource" value="/WEB-INF/cocoon/log4j.xconf"/>
+  </bean>
+
+  <!-- Load Avalon configurations -->
+  <avalon:bridge/>
 
 </beans>

Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/resources/org/apache/cocoon/maven/deployer/monolithic/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/resources/org/apache/cocoon/maven/deployer/monolithic/WEB-INF/applicationContext.xml?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/resources/org/apache/cocoon/maven/deployer/monolithic/WEB-INF/applicationContext.xml
(original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/resources/org/apache/cocoon/maven/deployer/monolithic/WEB-INF/applicationContext.xml
Thu Jan  4 05:59:29 2007
@@ -29,11 +29,13 @@
   <!-- Activate Cocoon Spring Configurator -->
   <configurator:settings/>
 
-  <!-- Load Avalon configurations
-       If you want to use a different logger than the default log4j logger,
-       add a bean conforming to the Avalon Logger interface to this definition
-       and leave out the loggingConfiguration attribute.
-   -->
-  <avalon:avalon loggingConfiguration="/WEB-INF/cocoon/log4j.xconf"/>
+  <bean name="org.apache.cocoon.spring.configurator.log4j"
+        class="org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator"
+        scope="singleton">
+    <property name="resource" value="/WEB-INF/cocoon/log4j.xconf"/>
+  </bean>
+
+  <!-- Load Avalon configurations -->
+  <avalon:bridge/>
 
 </beans>

Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml?view=diff&rev=492569&r1=492568&r2=492569
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml
(original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml
Thu Jan  4 05:59:29 2007
@@ -29,13 +29,13 @@
   <!-- Activate Cocoon Spring Configurator -->
   <configurator:settings/>
 
-  <!-- Load Avalon configurations
-       If you want to use a different logger than the default log4j logger,
-       add a bean conforming to the Avalon Logger interface to this definition
-       and leave out the loggingConfiguration attribute.
-       If you have an own cocoon.xconf specify the location attribute,
-       like location="/WEB-INF/cocoon/cocoon.xconf".
-   -->
-  <avalon:avalon loggingConfiguration="/WEB-INF/log4j.xml"/>
+  <bean name="org.apache.cocoon.spring.configurator.log4j"
+        class="org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator"
+        scope="singleton">
+    <property name="resource" value="/WEB-INF/cocoon/log4j.xconf"/>
+  </bean>
+
+  <!-- Load Avalon configurations -->
+  <avalon:bridge/>
 
 </beans>



Mime
View raw message