froehlich    01/12/19 03:52:44

  Modified:    src/org/apache/cocoon Cocoon.java
  Log:
  removed ActiveMonitor: a) team indecisive about need, b) indecisive for cleaning up 
HEAD branch
  
  Revision  Changes    Path
  1.35      +5 -40     xml-cocoon2/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Cocoon.java       2001/12/10 05:46:46     1.34
  +++ Cocoon.java       2001/12/19 11:52:44     1.35
  @@ -59,8 +59,6 @@
   import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
   import org.apache.avalon.excalibur.logger.LogKitManageable;
   import org.apache.avalon.excalibur.logger.LogKitManager;
  -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.activity.Initializable;
   import org.apache.avalon.framework.component.Component;
  @@ -92,8 +90,6 @@
   import org.apache.cocoon.util.ClassUtils;
   import org.xml.sax.InputSource;
   
  -import java.beans.PropertyChangeListener;
  -import java.beans.PropertyChangeEvent;
   import java.io.BufferedInputStream;
   import java.io.File;
   import java.io.IOException;
  @@ -108,7 +104,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Pierpaolo Fumagalli</a> (Apache 
Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Leo Sutic</a>
  - * @version CVS $Revision: 1.34 $ $Date: 2001/12/10 05:46:46 $
  + * @version CVS $Revision: 1.35 $ $Date: 2001/12/19 11:52:44 $
    */
   public class Cocoon
           extends AbstractLoggable
  @@ -120,8 +116,8 @@
                      Processor,
                      Contextualizable,
                      Composable,
  -                   LogKitManageable,
  -                   PropertyChangeListener {
  +                   LogKitManageable {
  +
       /** The application context */
       private Context context;
   
  @@ -158,12 +154,6 @@
       /** the Processor if it is ThreadSafe */
       private Processor threadSafeProcessor = null;
   
  -    /** Resource Monitor */
  -    private Monitor monitor;
  -
  -    /** Last modified date */
  -    private long lastModified;
  -
       /**
        * Creates a new <code>Cocoon</code> instance.
        *
  @@ -182,7 +172,6 @@
        */
       public void compose(ComponentManager manager) {
           this.parentComponentManager = manager;
  -       
       }
   
       /**
  @@ -441,18 +430,6 @@
           }
           this.componentManager.configure(conf);
   
  -        /** Monitoring the Configuration source */
  -        try {
  -            this.monitor = (Monitor)this.componentManager.lookup(Monitor.ROLE);
  -            URL configURL = new URL(configurationFile.getSystemId());
  -            getLogger().debug("Configuration path=" + configURL.getFile());
  -            FileResource file = new FileResource(configURL.getFile());
  -            file.addPropertyChangeListener(this);
  -            monitor.addResource(file);
  -        } catch (Exception e) {
  -            getLogger().error("Caught Exception while setting up the Resource 
Monitor", e);
  -        }
  -
           return conf;
       }
   
  @@ -463,8 +440,8 @@
        * @return a <code>boolean</code> value
        */
       public boolean modifiedSince(long date) {
  -        getLogger().debug("modifiedSince(..) date=" + date);
  -        return date < this.getLastModified();
  +        this.configurationFile.refresh();   
  +        return date < this.configurationFile.getLastModified(); 
       }
   
       /**
  @@ -760,17 +737,5 @@
        */
       private static synchronized void decRequestCount() {
           --activeRequestCount;
  -    }
  -
  -    public void propertyChange(PropertyChangeEvent evt) {
  -        setLastModified(((Long)evt.getNewValue()).longValue());
  -    }
  -
  -    private void setLastModified(long _lastModified) {
  -        lastModified = _lastModified;
  -    }
  -
  -    private long getLastModified() {
  -        return lastModified;
       }
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to