You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by fr...@apache.org on 2011/01/11 23:44:16 UTC

svn commit: r1057902 - in /lenya/branches/BRANCH_2_1_X/src: impl/java/org/apache/lenya/cms/cluster/impl/ java/org/apache/lenya/cms/cluster/ webapp/lenya/config/cluster/ webapp/lenya/config/cocoon-xconf/cluster/

Author: froethenbacher
Date: Tue Jan 11 22:44:16 2011
New Revision: 1057902

URL: http://svn.apache.org/viewvc?rev=1057902&view=rev
Log:
Added rsync content synchronization for clustered Lenya instances.

Added:
    lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncExecutionThread.java
    lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncRepositoryListenerImpl.java
    lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/RsyncRepositoryListener.java
    lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster-repository-listener.xconf
Modified:
    lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/ClusterManagerImpl.java
    lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/ClusterManager.java
    lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cluster/cluster.xconf
    lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster.xconf

Modified: lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/ClusterManagerImpl.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/ClusterManagerImpl.java?rev=1057902&r1=1057901&r2=1057902&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/ClusterManagerImpl.java (original)
+++ lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/ClusterManagerImpl.java Tue Jan 11 22:44:16 2011
@@ -26,6 +26,7 @@ import org.apache.avalon.framework.servi
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
+import org.apache.excalibur.source.SourceUtil;
 import org.apache.lenya.cms.cluster.ClusterManager;
 import org.apache.lenya.cms.cluster.ClusterConfigurationException;
 import org.apache.lenya.cms.cluster.ClusterMode;
@@ -46,6 +47,11 @@ implements ClusterManager, Initializable
 
     private boolean isClusterEnabled = false;
     private ClusterMode clusterMode = ClusterMode.MASTER;
+    private boolean isRsyncSynchronizationEnabled = false;
+    private String rsyncCommand;
+    private String rsyncOptions;
+    private String[] rsyncTargets;
+    private String rsyncBaseDir;
 
     @Override
     public boolean isClusterEnabled() {
@@ -63,6 +69,32 @@ implements ClusterManager, Initializable
     }
 
     @Override
+    public boolean isRsyncSynchronizationEnabled() {
+        return isClusterEnabled() && isMaster() &&
+                isRsyncSynchronizationEnabled;
+    }
+
+    @Override
+    public String getRsyncCommand() {
+        return rsyncCommand;
+    }
+
+    @Override
+    public String getRsyncOptions() {
+        return rsyncOptions;
+    }
+
+    @Override
+    public String[] getRsyncTargets() {
+        return rsyncTargets;
+    }
+
+    @Override
+    public String getRsyncBaseDir() {
+        return rsyncBaseDir;
+    }
+
+    @Override
     public void initialize() throws Exception {
         SourceResolver resolver = null;
         try {
@@ -117,12 +149,57 @@ implements ClusterManager, Initializable
                 }
                 clusterMode = ClusterMode.MASTER;
             }
+            // Read rsync settings.
+            Configuration rsyncConfig = config.getChild("rsync");
+            Configuration rsyncEnabledElem = rsyncConfig.getChild("enabled");
+            isRsyncSynchronizationEnabled = rsyncEnabledElem.getValueAsBoolean(false);
+            Configuration rsyncCommandElem = rsyncConfig.getChild("command");
+            rsyncCommand = rsyncCommandElem.getValue("/usr/bin/rsync");
+            Configuration rsyncOptionsElem = rsyncConfig.getChild("options");
+            rsyncOptions = rsyncOptionsElem.getValue("-av");
+            Configuration rsyncTargetsElem = rsyncConfig.getChild("targets");
+            Configuration[] rsyncTargetElems = rsyncTargetsElem.getChildren("target");
+            rsyncTargets = new String[rsyncTargetElems.length];
+            for (int i=0; i<rsyncTargets.length; i++) {
+                rsyncTargets[i] = rsyncTargetElems[i].getValue();
+            }
+            Configuration rsyncBaseDirElem = rsyncConfig.getChild("baseDir");
+            if (rsyncBaseDirElem == null) {
+                rsyncBaseDir = getDefaultRsyncBaseDir();
+            } else {
+                rsyncBaseDir = rsyncBaseDirElem.getValue(
+                        getDefaultRsyncBaseDir());
+            }
         } catch (Exception e) {
             throw new ClusterConfigurationException(
                     "Error reading cluster configuration", e);
         }
     }
 
+    /**
+     * Get default rsync base directory.
+     * This is the servlet context directory.
+     * @return Rsync default base directory.
+     */
+    private String getDefaultRsyncBaseDir() {
+        SourceResolver resolver = null;
+        Source source = null;
+        try {
+            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
+            source = resolver.resolveURI("context:///");
+            return SourceUtil.getFile(source).getCanonicalPath();
+        } catch (Exception e) {
+            throw new RuntimeException("Error getting servlet context");
+        } finally {
+            if (resolver != null) {
+                if (source != null) {
+                    resolver.release(source);
+                }
+                this.manager.release(resolver);
+            }
+        }        
+    }
+
     @Override
     public void service(ServiceManager manager) throws ServiceException {
         this.manager = manager;

Added: lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncExecutionThread.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncExecutionThread.java?rev=1057902&view=auto
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncExecutionThread.java (added)
+++ lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncExecutionThread.java Tue Jan 11 22:44:16 2011
@@ -0,0 +1,211 @@
+package org.apache.lenya.cms.cluster.impl;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import org.apache.avalon.framework.logger.LogEnabled;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.commons.lang.Validate;
+import org.apache.commons.lang.text.StrBuilder;
+import org.apache.lenya.cms.observation.DocumentEvent;
+import org.apache.lenya.cms.observation.RepositoryEvent;
+import org.apache.lenya.cms.publication.DocumentFactory;
+import org.apache.lenya.cms.publication.DocumentUtil;
+import org.apache.lenya.cms.publication.Publication;
+import org.apache.lenya.cms.publication.PublicationException;
+import org.apache.lenya.cms.publication.PublicationManager;
+
+/**
+ * Thread implementation for executing rsync to synchronize
+ * clustered content.
+ */
+public class RsyncExecutionThread extends Thread implements Serviceable, LogEnabled {
+
+    private Logger logger;
+    private ServiceManager manager;
+    private PublicationManager publicationManager;
+
+    private File baseDir;
+    private String command;
+    private String options;
+    private String[] targets;
+
+    private RepositoryEvent event;
+
+    /**
+     * C'tor.
+     * @param event Repository event.
+     * @param command rsync command.
+     * @param options rsync options.
+     * @param targets Array of targets.
+     * @param baseDir rsync base directory.
+     */
+    public RsyncExecutionThread(RepositoryEvent event,
+            String command, String options, String[] targets,
+            File baseDir)
+    {
+        Validate.notNull(event, "event must not be null");
+        Validate.notNull(command, "command must not be null");
+        Validate.notNull(options, "options must not be null");
+        Validate.notNull(targets, "targets must not be null");
+        Validate.notNull(baseDir, "baseDir must not be null");
+        this.event = event;
+        this.command = command;
+        this.options = options;
+        this.targets = targets;
+        this.baseDir = baseDir;
+    }
+
+    @Override
+    public void run() {
+        Validate.notNull(logger, "logger not initialized");
+        Validate.notNull(manager, "manager not initialized");
+        Validate.notNull(publicationManager,
+                "publicationManager not initialized");
+        String[] sources = null;
+        try {
+            if (event instanceof DocumentEvent) {
+                DocumentEvent docEvent = (DocumentEvent) event;
+                if (Publication.LIVE_AREA.equals(docEvent.getArea())) {
+                    // Get source files affected by repository event.
+                    sources = getSources(docEvent);
+                }
+            }
+        } catch (Exception e) {
+            if (getLogger().isErrorEnabled())
+                getLogger().error("Error getting sources for rsync", e);
+        }
+        if (sources != null) {
+            // Build whitespace separated list of source files.
+            StrBuilder sourceBuilder = new StrBuilder()
+                    .appendWithSeparators(sources, " ");
+            String source = sourceBuilder.toString();
+            // Synchronize with each target.
+            for (String target : targets) {
+                synchronizeWithHost(source, target);
+            }
+        }
+    }
+
+    /**
+     * Get modified sources from DocumentEvent.
+     * @param event Document event.
+     * @return Space separated list of modified sources.
+     * @throws PublicationException If creating publication fails.
+     */
+    private String[] getSources(DocumentEvent event)
+    throws PublicationException
+    {
+        ArrayList<String> sources = new ArrayList<String>();
+        String baseDirPath = baseDir.getAbsolutePath();
+        DocumentFactory documentFactory = DocumentUtil
+                .createDocumentFactory(manager, event.getSession());
+        Publication publication = publicationManager.getPublication(
+                documentFactory, event.getPublicationId());
+        File contentDir = publication.getContentDirectory(
+                event.getArea());
+        File docFile = new File(contentDir, event.getUuid());
+        if (docFile.exists()) {
+            String path = docFile.getAbsolutePath();
+            if (path.startsWith(baseDirPath)) {
+                // Make path relative to baseDir.
+                path = path.substring(baseDirPath.length() + 1);
+            }
+            sources.add(path);
+        } else {
+            if (getLogger().isErrorEnabled()) {
+                getLogger().error("File for rsync synchronization not found [" +
+                        docFile.getAbsolutePath() + "]");
+            }
+        }
+        // Sync site tree and associated files too.
+        File siteTreeFile = new File(contentDir, "sitetree.xml");
+        String path = siteTreeFile.getAbsolutePath() + "*";
+        if (path.startsWith(baseDirPath)) {
+            // Make path relative to baseDir
+            path = path.substring(baseDirPath.length() + 1);
+        }
+        sources.add(path);
+        return sources.toArray(new String[sources.size()]);
+    }
+
+    /**
+     * Execute rsync to synchronize source with target.
+     * @param source Space separated list of source files. May use
+     *      wildcards like '*' for shell expansion.
+     * @param target Target.
+     */
+    private void synchronizeWithHost(String source, String target) {
+        Validate.notNull(source, "source must not be null");
+        Validate.notNull(target, "target must not be null");
+        String[] cmd = new String[] { command, options, source, target };
+        StrBuilder sb = new StrBuilder().appendWithSeparators(cmd, " ");
+        String[] shellCmd = new String[] {"/bin/sh",  "-c",  sb.toString()};
+        // Log command.
+        if (getLogger().isDebugEnabled()) {
+            StrBuilder cmdStr = new StrBuilder()
+                    .appendWithSeparators(shellCmd, " ");
+            getLogger().debug("Executing rsync command [" +
+                    cmdStr.toString() + "]");
+        }
+        // Buffers for processing output and error output.
+        // Note: output stream must be processed because limited
+        // buffer capability may hang process.
+        StringBuffer error =
+            new StringBuffer("Error executing 'rsync' command\n");
+        StringBuffer output = new StringBuffer("rsync command executed:\n");
+        try {
+            // Execute rsync command.
+            Process proc = Runtime.getRuntime().exec(shellCmd, null,
+                    baseDir);
+            // Process error output.
+            InputStream stderr = proc.getErrorStream();
+            InputStreamReader isr = new InputStreamReader(stderr);
+            BufferedReader br = new BufferedReader(isr);
+            String line = null;
+            while ( (line = br.readLine()) != null)
+                error.append(line).append("\n");
+            // Process output.
+            InputStream stdout = proc.getInputStream();
+            isr = new InputStreamReader(stdout);
+            br = new BufferedReader(isr);
+            line = null;
+            while ( (line = br.readLine()) != null)
+                output.append(line).append("\n");
+            int exitCode = proc.waitFor();
+            // Log output or any error.
+            if (exitCode != 0) {
+                if(getLogger().isErrorEnabled())
+                    getLogger().error(error.toString());
+            } else {
+                if (getLogger().isDebugEnabled())
+                    getLogger().debug(output.toString());
+            }
+        } catch (Exception e) {
+            if (getLogger().isErrorEnabled())
+                getLogger().error("Error executing 'rsync' command", e);
+        }
+    }
+
+    public Logger getLogger() {
+        return logger;
+    }
+
+    @Override
+    public void service(ServiceManager manager) throws ServiceException {
+        this.manager = manager;
+        this.publicationManager = (PublicationManager) manager.lookup(
+                PublicationManager.ROLE); 
+    }
+
+    @Override
+    public void enableLogging(Logger logger) {
+        this.logger = logger;
+    }
+}
\ No newline at end of file

Added: lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncRepositoryListenerImpl.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncRepositoryListenerImpl.java?rev=1057902&view=auto
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncRepositoryListenerImpl.java (added)
+++ lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/cluster/impl/RsyncRepositoryListenerImpl.java Tue Jan 11 22:44:16 2011
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.lenya.cms.cluster.impl;
+
+import java.io.File;
+
+import org.apache.avalon.framework.activity.Initializable;
+import org.apache.avalon.framework.activity.Startable;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.lenya.cms.cluster.ClusterConfigurationException;
+import org.apache.lenya.cms.cluster.ClusterManager;
+import org.apache.lenya.cms.cluster.RsyncRepositoryListener;
+import org.apache.lenya.cms.observation.ObservationRegistry;
+import org.apache.lenya.cms.observation.RepositoryEvent;
+
+/**
+ * Rsync repository listener.
+ * Triggers rsync when repository was modified for pushing changes to remote
+ * hosts.
+ * 
+ * This is an alternative approach than to having a shared
+ * file system (like NFS) for storing content when running in a clustered
+ * environment.
+ */
+public class RsyncRepositoryListenerImpl extends AbstractLogEnabled
+implements Serviceable, Startable, RsyncRepositoryListener, Initializable,
+        ThreadSafe
+{
+    private ServiceManager manager;
+    private ClusterManager clusterManager;
+
+    private File baseDir;
+    private String command;
+    private String options;
+    private String[] targets;
+
+    @Override
+    public void eventFired(RepositoryEvent event) {
+        // Synchronize content in a separate thread.
+        RsyncExecutionThread rsyncThread = new RsyncExecutionThread(
+                event, command, options, targets, baseDir);
+        try {
+            rsyncThread.service(manager);
+        } catch (ServiceException e) {
+            if (getLogger().isErrorEnabled())
+                getLogger().error("Error initializing RsyncExecutionThread", e);
+        }
+        rsyncThread.enableLogging(getLogger());
+        rsyncThread.start();
+    }
+
+    @Override
+    public void service(ServiceManager manager) throws ServiceException {
+        this.manager = manager;
+        this.clusterManager = (ClusterManager) manager.lookup(
+                ClusterManager.ROLE);
+    }
+
+    @Override
+    public void initialize() throws Exception {
+        command = clusterManager.getRsyncCommand();
+        options = clusterManager.getRsyncOptions();
+        targets = clusterManager.getRsyncTargets();
+        baseDir = new File(clusterManager.getRsyncBaseDir());
+        validateConfiguration();
+        if (getLogger().isInfoEnabled()) {
+            getLogger().info("Using rsync command [" + command +
+                    "] with options [" + options + "]");
+            getLogger().info("rsync base directory [" +
+                    baseDir.getAbsolutePath() + "]");
+        }
+    }
+
+    /**
+     * Validate that command and base directory exists.
+     * @throws ClusterConfigurationException If validation fails.
+     */
+    private void validateConfiguration() throws ClusterConfigurationException {
+        // Validate that rsync command exists.
+        File f = new File(command);
+        if (!f.exists()) {
+            throw new ClusterConfigurationException(
+                    "rsync command not found [" + command + "]");
+        }
+        // Validate rsync base directory.
+        if (!baseDir.exists()) {
+            throw new ClusterConfigurationException(
+                    "Rsync base dir not found [" +
+                    baseDir.getAbsolutePath() + "]");
+        }
+    }
+
+    @Override
+    public void start() throws Exception {
+        if (clusterManager.isRsyncSynchronizationEnabled()) {
+            ObservationRegistry registry = null;
+            try {
+                registry = (ObservationRegistry) manager.lookup(
+                        ObservationRegistry.ROLE);
+                registry.registerListener(this);
+                if (getLogger().isInfoEnabled())
+                    getLogger().info("Registered rsync repository listener.");
+            } finally {
+                if (registry != null) {
+                    this.manager.release(registry);
+                }
+            }
+        }
+    }
+
+    @Override
+    public void stop() throws Exception {
+    }
+
+}

Modified: lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/ClusterManager.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/ClusterManager.java?rev=1057902&r1=1057901&r2=1057902&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/ClusterManager.java (original)
+++ lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/ClusterManager.java Tue Jan 11 22:44:16 2011
@@ -49,4 +49,13 @@ public interface ClusterManager extends 
      */
     public boolean isSlave();
 
+    boolean isRsyncSynchronizationEnabled();
+
+    String getRsyncCommand();
+
+    String getRsyncOptions();
+
+    String[] getRsyncTargets();
+
+    String getRsyncBaseDir();
 }

Added: lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/RsyncRepositoryListener.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/RsyncRepositoryListener.java?rev=1057902&view=auto
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/RsyncRepositoryListener.java (added)
+++ lenya/branches/BRANCH_2_1_X/src/java/org/apache/lenya/cms/cluster/RsyncRepositoryListener.java Tue Jan 11 22:44:16 2011
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.lenya.cms.cluster;
+
+import org.apache.lenya.cms.observation.RepositoryListener;
+
+public interface RsyncRepositoryListener extends RepositoryListener {
+
+    String ROLE = RsyncRepositoryListener.class.getName();
+}

Modified: lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cluster/cluster.xconf
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cluster/cluster.xconf?rev=1057902&r1=1057901&r2=1057902&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cluster/cluster.xconf (original)
+++ lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cluster/cluster.xconf Tue Jan 11 22:44:16 2011
@@ -23,4 +23,23 @@
   <!-- Cluster mode [master|slave] -->
   <mode>master</mode>
 
+  <!-- rsync clustered content synchronization. -->
+  <!-- This is an alternative approach to storing content on a -->
+  <!-- shared file system (i.e. NFS) in a clustered environment. -->
+  <rsync>
+    <enabled>false</enabled>
+    <command>/usr/bin/rsync</command>
+    <options>-Rrav --delete</options>
+    <!-- Base directory [optional]. Default is Lenya webapp directory. -->
+    <!-- Note: all paths will be relative to the base directory. --> 
+    <!--
+    <baseDir>/opt/lenya/data</baseDir>
+      -->
+    <targets>
+      <!-- Test destination on local file system.
+      <target>/tmp</target>
+        -->
+    </targets>
+  </rsync>
+
 </cluster>

Added: lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster-repository-listener.xconf
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster-repository-listener.xconf?rev=1057902&view=auto
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster-repository-listener.xconf (added)
+++ lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster-repository-listener.xconf Tue Jan 11 22:44:16 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id: $ -->
+
+  <xconf xpath="/cocoon" unless="/cocoon/component[@role = 'org.apache.lenya.cms.cluster.RsyncRepositoryListener']">
+
+    <component class="org.apache.lenya.cms.cluster.impl.RsyncRepositoryListenerImpl"
+        logger="lenya.cluster"
+        role="org.apache.lenya.cms.cluster.RsyncRepositoryListener"/>
+
+  </xconf>

Modified: lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster.xconf
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster.xconf?rev=1057902&r1=1057901&r2=1057902&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster.xconf (original)
+++ lenya/branches/BRANCH_2_1_X/src/webapp/lenya/config/cocoon-xconf/cluster/cluster.xconf Tue Jan 11 22:44:16 2011
@@ -19,6 +19,9 @@
 <!-- $Id: usecases-workflow-deactivate.xconf 348547 2005-11-23 20:13:01Z chestnut $ -->
 
   <xconf xpath="/cocoon" unless="/cocoon/component[@role = 'org.apache.lenya.cms.cluster.ClusterManager']">
-    <component class="org.apache.lenya.cms.cluster.impl.ClusterManagerImpl" logger="lenya.cocoon.components"
+
+    <component class="org.apache.lenya.cms.cluster.impl.ClusterManagerImpl"
+        logger="lenya.cluster"
         role="org.apache.lenya.cms.cluster.ClusterManager"/>
+
   </xconf>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org