cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r471044 - in /cocoon/trunk/core: cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/ cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ cocoon-...
Date Fri, 03 Nov 2006 23:13:15 GMT
Author: cziegeler
Date: Fri Nov  3 15:13:14 2006
New Revision: 471044

URL: http://svn.apache.org/viewvc?view=rev&rev=471044
Log:
Refactor to use own package for reloading stuff

Added:
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/Monitor.java
      - copied, changed from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/NotifyingResourceStore.java
      - copied, changed from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/PatternMatcherResourceStore.java
      - copied, changed from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoader.java
      - copied, changed from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderConfiguration.java
  (with props)
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderFactory.java
      - copied, changed from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java
Removed:
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java
Modified:
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java
    cocoon/trunk/core/cocoon-bootstrap/src/main/resources/META-INF/cocoon/avalon/cocoon-bootstrap-realoding-classloader-factory.xconf
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/fam/MonitorImpl.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapHelper.java
    cocoon/trunk/core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles

Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java?view=diff&rev=471044&r1=471043&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java
(original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java
Fri Nov  3 15:13:14 2006
@@ -17,16 +17,11 @@
 package org.apache.cocoon.classloader;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
-
-import org.apache.cocoon.classloader.fam.Monitor;
-import org.apache.commons.jci.listeners.NotificationListener;
-import org.apache.commons.jci.stores.ResourceStore;
 
 /**
  * The configuration for a {@link ClassLoaderFactory}.
+ *
  * @version $Id$
  * @since 2.2
  */
@@ -37,9 +32,6 @@
     protected final List sourceDirectories = new ArrayList();
     protected final List classDirectories = new ArrayList();
     protected final List libDirectories = new ArrayList();
-    protected final Map storeDirectories = new HashMap();
-    private Monitor monitor;
-    private NotificationListener notificationListener;
 
     public void addInclude(String include) {
         this.includes.add(include);
@@ -79,30 +71,5 @@
     
     public List getIncludes() {
         return includes;
-    }
-
-    public void addStore(String dir, ResourceStore store) {
-        this.storeDirectories.put(dir, store);
-    }
-
-    public ResourceStore getStore(String dir) {
-        return (ResourceStore)this.storeDirectories.get(dir);
-    }
-
-    public void setMonitor(Monitor monitor) {
-        this.monitor = monitor;
-        
-    }
-
-    public Monitor getMonitor() {
-        return monitor;
-    }
-
-    public void setNotificationListener(NotificationListener notificationListener) {
-        this.notificationListener = notificationListener;        
-    }
-
-    public NotificationListener getNotificationListener() {
-        return this.notificationListener;
     }
 }

Copied: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/Monitor.java
(from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/Monitor.java?view=diff&rev=471044&p1=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java&r1=471000&p2=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/Monitor.java&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java
(original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/Monitor.java
Fri Nov  3 15:13:14 2006
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.classloader.fam;
+package org.apache.cocoon.classloader.reloading;
 
 import org.apache.commons.jci.listeners.NotificationListener;
 import org.apache.commons.jci.monitor.FilesystemAlterationListener;

Copied: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/NotifyingResourceStore.java
(from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/NotifyingResourceStore.java?view=diff&rev=471044&p1=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java&r1=471000&p2=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/NotifyingResourceStore.java&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java
(original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/NotifyingResourceStore.java
Fri Nov  3 15:13:14 2006
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.classloader;
+package org.apache.cocoon.classloader.reloading;
 
 import org.apache.commons.jci.listeners.NotificationListener;
 import org.apache.commons.jci.stores.ResourceStore;

Copied: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/PatternMatcherResourceStore.java
(from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/PatternMatcherResourceStore.java?view=diff&rev=471044&p1=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java&r1=471000&p2=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/PatternMatcherResourceStore.java&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java
(original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/PatternMatcherResourceStore.java
Fri Nov  3 15:13:14 2006
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.classloader;
+package org.apache.cocoon.classloader.reloading;
 
 import java.util.List;
 

Copied: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoader.java
(from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoader.java?view=diff&rev=471044&p1=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java&r1=471000&p2=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoader.java&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java
(original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoader.java
Fri Nov  3 15:13:14 2006
@@ -14,12 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.classloader;
+package org.apache.cocoon.classloader.reloading;
 
 import java.net.URL;
 import java.net.URLStreamHandlerFactory;
 import java.util.List;
 
+import org.apache.cocoon.classloader.DefaultClassLoader;
 import org.apache.commons.jci.stores.ResourceStore;
 
 /**

Added: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderConfiguration.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderConfiguration.java?view=auto&rev=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderConfiguration.java
(added)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderConfiguration.java
Fri Nov  3 15:13:14 2006
@@ -0,0 +1,61 @@
+/*
+ * 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.cocoon.classloader.reloading;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.cocoon.classloader.ClassLoaderConfiguration;
+import org.apache.cocoon.classloader.reloading.Monitor;
+import org.apache.commons.jci.listeners.NotificationListener;
+import org.apache.commons.jci.stores.ResourceStore;
+
+/**
+ * @version $Id$
+ * @since 2.2
+ */
+public class ReloadingClassLoaderConfiguration extends ClassLoaderConfiguration {
+
+    protected final Map storeDirectories = new HashMap();
+    protected Monitor monitor;
+    protected NotificationListener notificationListener;
+
+    public void addStore(String dir, ResourceStore store) {
+        this.storeDirectories.put(dir, store);
+    }
+
+    public ResourceStore getStore(String dir) {
+        return (ResourceStore)this.storeDirectories.get(dir);
+    }
+
+    public void setMonitor(Monitor monitor) {
+        this.monitor = monitor;
+        
+    }
+
+    public Monitor getMonitor() {
+        return monitor;
+    }
+
+    public void setNotificationListener(NotificationListener notificationListener) {
+        this.notificationListener = notificationListener;        
+    }
+
+    public NotificationListener getNotificationListener() {
+        return this.notificationListener;
+    }
+}

Propchange: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderFactory.java
(from r471000, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderFactory.java?view=diff&rev=471044&p1=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java&r1=471000&p2=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderFactory.java&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java
(original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/reloading/ReloadingClassLoaderFactory.java
Fri Nov  3 15:13:14 2006
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.classloader;
+package org.apache.cocoon.classloader.reloading;
 
 import java.io.File;
 import java.net.URL;
@@ -22,7 +22,9 @@
 
 import javax.servlet.ServletContext;
 
-import org.apache.cocoon.classloader.fam.Monitor;
+import org.apache.cocoon.classloader.AbstractClassLoaderFactory;
+import org.apache.cocoon.classloader.ClassLoaderConfiguration;
+import org.apache.cocoon.classloader.DefaultClassLoader;
 import org.apache.commons.jci.listeners.ReloadingListener;
 import org.apache.commons.jci.stores.ResourceStore;
 import org.apache.commons.logging.Log;
@@ -58,25 +60,28 @@
                 new DefaultClassLoader(urls, includePatterns,
                         excludePatterns, Thread.currentThread()
                                 .getContextClassLoader()));
-
-        Monitor fam = this.config.getMonitor();
-        
-        for (int i = 0; i < urls.length; i++) {
-            URL url = urls[i];
-            final ResourceStore store = this.config.getStore(url.getFile());
-
-            final ReloadingListener listener = createReloadingListener(url,
-                    store, this.config);
-            jciClassLoader.addListener(listener);
-            fam.subscribe(listener);
-            try {
-                listener.waitForFirstCheck();
-            } catch (Exception e) {
-                log.error("Timeout error configuring JCI Listener for url "
-                        + url + " having store " + store);
-            }
-            log.debug("ReloadingClassLoaderFactory - Subscriber SitemapMonitor listener for
url "
+        Monitor fam = null;
+        if ( this.config instanceof ReloadingClassLoaderConfiguration ) {
+            fam = ((ReloadingClassLoaderConfiguration)this.config).getMonitor();
+        }
+        if ( fam != null ) {
+            for (int i = 0; i < urls.length; i++) {
+                URL url = urls[i];
+                final ResourceStore store = ((ReloadingClassLoaderConfiguration)this.config).getStore(url.getFile());
+    
+                final ReloadingListener listener = createReloadingListener(url,
+                        store, this.config);
+                jciClassLoader.addListener(listener);
+                fam.subscribe(listener);
+                try {
+                    listener.waitForFirstCheck();
+                } catch (Exception e) {
+                    log.error("Timeout error configuring JCI Listener for url "
                             + url + " having store " + store);
+                }
+                log.debug("ReloadingClassLoaderFactory - Subscriber SitemapMonitor listener
for url "
+                                + url + " having store " + store);
+            }
         }
         return jciClassLoader;
     }

Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/resources/META-INF/cocoon/avalon/cocoon-bootstrap-realoding-classloader-factory.xconf
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/resources/META-INF/cocoon/avalon/cocoon-bootstrap-realoding-classloader-factory.xconf?view=diff&rev=471044&r1=471043&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/resources/META-INF/cocoon/avalon/cocoon-bootstrap-realoding-classloader-factory.xconf
(original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/resources/META-INF/cocoon/avalon/cocoon-bootstrap-realoding-classloader-factory.xconf
Fri Nov  3 15:13:14 2006
@@ -15,15 +15,15 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!-- SVN $Id: cocoon-core.xconf 396505 2006-04-24 10:33:03Z antonio $ -->
+<!-- @version $Id: cocoon-core.xconf 396505 2006-04-24 10:33:03Z antonio $ -->
 <components>
 
   <!--+
       | Reloading classloader
       +-->
   <component logger="core.classloader"
-    role="org.apache.cocoon.classloader.ClassLoaderFactory/reloading"
-    class="org.apache.cocoon.classloader.ReloadingClassLoaderFactory">
+             role="org.apache.cocoon.classloader.ClassLoaderFactory/reloading"
+             class="org.apache.cocoon.classloader.reloading.ReloadingClassLoaderFactory">
   </component>
 
 </components>

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/fam/MonitorImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/fam/MonitorImpl.java?view=diff&rev=471044&r1=471043&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/fam/MonitorImpl.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/fam/MonitorImpl.java
Fri Nov  3 15:13:14 2006
@@ -22,8 +22,8 @@
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.classloader.NotifyingResourceStore;
-import org.apache.cocoon.classloader.fam.Monitor;
+import org.apache.cocoon.classloader.reloading.Monitor;
+import org.apache.cocoon.classloader.reloading.NotifyingResourceStore;
 import org.apache.commons.jci.listeners.NotificationListener;
 import org.apache.commons.jci.listeners.ReloadingListener;
 import org.apache.commons.jci.monitor.FilesystemAlterationListener;
@@ -58,7 +58,7 @@
     }
 
     /**
-     * @see org.apache.cocoon.classloader.fam.Monitor#subscribe(org.apache.commons.jci.monitor.FilesystemAlterationListener)
+     * @see org.apache.cocoon.classloader.reloading.Monitor#subscribe(org.apache.commons.jci.monitor.FilesystemAlterationListener)
      */
     public void subscribe(final FilesystemAlterationListener listener) {
         this.monitor.addListener(listener);
@@ -66,13 +66,16 @@
     }
 
     /**
-     * @see org.apache.cocoon.components.fam.Monitor#unsubscribe(org.apache.commons.jci.monitor.FilesystemAlterationListener)
+     * @see org.apache.cocoon.classloader.reloading.Monitor#unsubscribe(org.apache.commons.jci.monitor.FilesystemAlterationListener)
      */
     public void unsubscribe(final FilesystemAlterationListener listener) {
         this.monitor.removeListener(listener);
         this.monitor.removeListener(new ReloadingListener(listener.getRepository(),new NotifyingResourceStore(this.sitemapNotifier)));
     }
     
+    /**
+     * @see org.apache.cocoon.classloader.reloading.Monitor#setSitemapNotifier(org.apache.commons.jci.listeners.NotificationListener)
+     */
     public void setSitemapNotifier(NotificationListener sitemapNotifier) {
         this.sitemapNotifier = sitemapNotifier;
     }    

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java?view=diff&rev=471044&r1=471043&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
Fri Nov  3 15:13:14 2006
@@ -45,7 +45,7 @@
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.cocoon.Constants;
 import org.apache.cocoon.ProcessingUtil;
-import org.apache.cocoon.classloader.fam.Monitor;
+import org.apache.cocoon.classloader.reloading.Monitor;
 import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.components.source.SourceUtil;
 import org.apache.cocoon.components.treeprocessor.AbstractProcessingNode;

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java?view=diff&rev=471044&r1=471043&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
Fri Nov  3 15:13:14 2006
@@ -22,7 +22,7 @@
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.cocoon.classloader.ClassLoaderConfiguration;
+import org.apache.cocoon.classloader.reloading.ReloadingClassLoaderConfiguration;
 import org.apache.cocoon.configuration.Settings;
 import org.apache.cocoon.configuration.impl.PropertyHelper;
 import org.apache.commons.jci.stores.ResourceStore;
@@ -88,10 +88,10 @@
      * @return           A class loader configuration object.
      * @throws Exception
      */
-    public static ClassLoaderConfiguration createConfiguration(SourceResolver resolver,
-                                                               Configuration  config)
+    public static ReloadingClassLoaderConfiguration createConfiguration(SourceResolver resolver,
+                                                                        Configuration  config)
     throws Exception {
-        final ClassLoaderConfiguration configBean = new ClassLoaderConfiguration();
+        final ReloadingClassLoaderConfiguration configBean = new ReloadingClassLoaderConfiguration();
         final Configuration[] children = config.getChildren();
         for (int i = 0; i < children.length; i++) {
             final Configuration child = children[i];
@@ -144,7 +144,10 @@
      * If a store node is configured in the class-dir/src-dir configuration, 
      * let's configure the store; the default one is the JCI MemoryStore
      */
-    private static void configureStore(ClassLoaderConfiguration configBean, String dirUri,
Configuration storeConfig) throws Exception {
+    private static void configureStore(ReloadingClassLoaderConfiguration configBean,
+                                       String                            dirUri,
+                                       Configuration                     storeConfig)
+    throws Exception {
         if (storeConfig != null) {
             final String storeClassName = storeConfig.getAttribute("class","org.apache.commons.jci.stores.MemoryResourceStore");
             final ResourceStore store = (ResourceStore)Class.forName(storeClassName).newInstance();

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapHelper.java?view=diff&rev=471044&r1=471043&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapHelper.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapHelper.java
Fri Nov  3 15:13:14 2006
@@ -25,9 +25,9 @@
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.cocoon.classloader.ClassLoaderConfiguration;
 import org.apache.cocoon.classloader.ClassLoaderFactory;
-import org.apache.cocoon.classloader.fam.Monitor;
+import org.apache.cocoon.classloader.reloading.Monitor;
+import org.apache.cocoon.classloader.reloading.ReloadingClassLoaderConfiguration;
 import org.apache.cocoon.core.container.spring.CocoonRequestAttributes;
 import org.apache.cocoon.core.container.spring.CocoonWebApplicationContext;
 import org.apache.cocoon.core.container.spring.Container;
@@ -206,7 +206,7 @@
         final String factoryRole = classPathConfig.getAttribute("factory-role", ClassLoaderFactory.ROLE);
 
         // Create a new classloader
-        ClassLoaderConfiguration configBean = AvalonUtils.createConfiguration(sitemapResolver,
classPathConfig);
+        ReloadingClassLoaderConfiguration configBean = AvalonUtils.createConfiguration(sitemapResolver,
classPathConfig);
         configBean.setMonitor(fam);
         ClassLoaderFactory clFactory = (ClassLoaderFactory)parentFactory.getBean(factoryRole);
         return clFactory.createClassLoader(Thread.currentThread().getContextClassLoader(),

Modified: cocoon/trunk/core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles?view=diff&rev=471044&r1=471043&r2=471044
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles (original)
+++ cocoon/trunk/core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles Fri Nov
 3 15:13:14 2006
@@ -182,7 +182,7 @@
         model="non-thread-safe-pooled"/>
 	
   <!--=========================================================================-->
-  <role name="org.apache.cocoon.classloader.fam.Monitor"
+  <role name="org.apache.cocoon.classloader.reloading.Monitor"
         shorthand="fam"
         default-class="org.apache.cocoon.components.fam.MonitorImpl"/>
 



Mime
View raw message