Index: ProgramGeneratorImpl.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java,v
retrieving revision 1.24
diff -u -r1.24 ProgramGeneratorImpl.java
--- ProgramGeneratorImpl.java	2001/12/09 21:36:42	1.24
+++ ProgramGeneratorImpl.java	2001/12/11 11:35:44
@@ -8,8 +8,6 @@
 
 package org.apache.cocoon.components.language.generator;
 
-import org.apache.avalon.excalibur.monitor.FileResource;
-import org.apache.avalon.excalibur.monitor.Monitor;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.component.*;
 import org.apache.avalon.framework.configuration.Configurable;
@@ -33,13 +31,9 @@
 import org.apache.cocoon.environment.Source;
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.util.IOUtils;
-import org.apache.cocoon.util.NetUtils;
 import org.xml.sax.InputSource;
 
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeEvent;
 import java.io.File;
-import java.net.URL;
 import java.net.MalformedURLException;
 
 /**
@@ -49,7 +43,7 @@
  */
 public class ProgramGeneratorImpl extends AbstractLoggable
     implements ProgramGenerator, Contextualizable, Composable, Configurable, ThreadSafe, 
-               Disposable, PropertyChangeListener {
+               Disposable {
 
     /** The auto-reloading option */
     protected boolean autoReload = false;
@@ -84,15 +78,6 @@
     /** Servlet Context Directory */
     protected String contextDir;
 
-    /** Resource monitoring */
-    protected Monitor monitor;
-
-    /** lastModified date */
-    protected long lastModified;
-
-    /** File resource */
-    protected FileResource file;
-
     /** Contextualize this class */
     public void contextualize(Context context) throws ContextException {
         if (this.workDir == null) {
@@ -127,7 +112,6 @@
                 this.markupSelector = (ComponentSelector)this.manager.lookup(MarkupLanguage.ROLE + "Selector");
                 this.languageSelector = (ComponentSelector)this.manager.lookup(ProgrammingLanguage.ROLE + "Selector");
                 this.classManager = (ClassLoaderManager)this.manager.lookup(ClassLoaderManager.ROLE);
-                this.monitor = (Monitor) this.manager.lookup(Monitor.ROLE);
             } catch (Exception e) {
                 getLogger().warn("Could not lookup Component", e);
             }
@@ -163,14 +147,6 @@
 
         Source source = resolver.resolve(fileName);
         
-        /** Monitoring the Sitemap source */
-        URL url = new URL(source.getSystemId());
-        getLogger().debug("Sitemap path=" + url.getFile());
-        file = new FileResource(url.getFile());
-        file.addPropertyChangeListener(this);
-        monitor.addResource(file);
-        getLogger().debug("lastModified date=" + this.getLastModified());
-        
         try {
             // Set filenames
             StringBuffer contextFilename = new StringBuffer(this.rootPackage.replace('.', File.separatorChar));
@@ -226,7 +202,7 @@
              * be queried for changes!!!
              */
 
-            if (programInstance != null && programInstance.modifiedSince(this.getLastModified())) {
+            if (programInstance != null && programInstance.modifiedSince(source.getLastModified())) {
                 // Release the component.
                 release(programInstance);
 
@@ -389,17 +365,5 @@
         this.manager.release((Component)this.repository);
         this.manager.release((Component)this.markupSelector);
         this.manager.release((Component)this.languageSelector);
-    }
-
-    public void propertyChange(PropertyChangeEvent evt) {
-        setLastModified(((Long)evt.getNewValue()).longValue());
-    }
-
-    private void setLastModified(long _lastModified) {
-        lastModified = _lastModified;
-    }
-
-    private long getLastModified() {
-        return lastModified;
     }
 }
