cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap Manager.java
Date Thu, 26 Apr 2001 21:12:11 GMT
bloritsch    01/04/26 14:12:11

  Modified:    src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
                        Roles.java
               src/org/apache/cocoon/components/saxconnector Tag:
                        xml-cocoon2 XIncludeSAXConnector.java
               src/org/apache/cocoon/sitemap Tag: xml-cocoon2 Manager.java
  Log:
  Rerouted requests through sitemap manager
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.79  +4 -2      xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.4.2.78
  retrieving revision 1.4.2.79
  diff -u -r1.4.2.78 -r1.4.2.79
  --- Cocoon.java	2001/04/25 17:04:53	1.4.2.78
  +++ Cocoon.java	2001/04/26 21:12:02	1.4.2.79
  @@ -27,6 +27,7 @@
   import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.avalon.logger.AbstractLoggable;
  +import org.apache.avalon.thread.ThreadSafe;
   import org.apache.cocoon.Modifiable;
   import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.components.language.generator.ProgramGenerator;
  @@ -51,9 +52,9 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
(Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.4.2.78 $ $Date: 2001/04/25 17:04:53 $
  + * @version CVS $Revision: 1.4.2.79 $ $Date: 2001/04/26 21:12:02 $
    */
  -public class Cocoon extends AbstractLoggable implements Component, Initializable, Disposable,
Modifiable, Processor, Contextualizable {
  +public class Cocoon extends AbstractLoggable implements ThreadSafe, Component, Initializable,
Disposable, Modifiable, Processor, Contextualizable {
       /** The application context */
       private Context context;
   
  @@ -211,6 +212,7 @@
           getLogger().debug("Sitemap location = " + this.sitemapFileName);
           getLogger().debug("Checking sitemap reload = " + this.checkSitemapReload);
           getLogger().debug("Reloading sitemap asynchron = " + this.reloadSitemapAsynchron);
  +        this.componentManager.addComponentInstance(Roles.SITEMAP_MANAGER, this.sitemapManager);
       }
   
       /** Queries the class to estimate its ergodic period termination. */
  
  
  
  1.1.2.16  +2 -1      xml-cocoon/src/org/apache/cocoon/Attic/Roles.java
  
  Index: Roles.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/Roles.java,v
  retrieving revision 1.1.2.15
  retrieving revision 1.1.2.16
  diff -u -r1.1.2.15 -r1.1.2.16
  --- Roles.java	2001/04/19 10:02:19	1.1.2.15
  +++ Roles.java	2001/04/26 21:12:03	1.1.2.16
  @@ -12,7 +12,7 @@
    * Created this interface to specify the Avalon role names.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.15 $ $Date: 2001/04/19 10:02:19 $
  + * @version CVS $Revision: 1.1.2.16 $ $Date: 2001/04/26 21:12:03 $
    */
   
   public interface Roles {
  @@ -49,5 +49,6 @@
       String XML_DESERIALIZER     = "org.apache.cocoon.components.sax.XMLDeserializer";
       String EVENT_CACHE          = "org.apache.cocoon.caching.EventCache";
       String STREAM_CACHE         = "org.apache.cocoon.caching.StreamCache";
  +    String SITEMAP_MANAGER      = "org.apache.cocoon.sitemap.Manager";
   
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.9   +8 -13     xml-cocoon/src/org/apache/cocoon/components/saxconnector/Attic/XIncludeSAXConnector.java
  
  Index: XIncludeSAXConnector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/saxconnector/Attic/XIncludeSAXConnector.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- XIncludeSAXConnector.java	2001/04/26 19:24:57	1.1.2.8
  +++ XIncludeSAXConnector.java	2001/04/26 21:12:07	1.1.2.9
  @@ -17,7 +17,6 @@
   import org.apache.avalon.component.Component;
   import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.component.ComponentManager;
  -import org.apache.avalon.component.ComponentSelector;
   import org.apache.avalon.component.Composable;
   import org.apache.avalon.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
  @@ -26,7 +25,7 @@
   import org.apache.cocoon.components.pipeline.StreamPipeline;
   import org.apache.cocoon.components.url.URLFactory;
   import org.apache.cocoon.environment.Environment;
  -import org.apache.cocoon.sitemap.Sitemap;
  +import org.apache.cocoon.sitemap.Manager;
   import org.apache.cocoon.xml.AbstractXMLPipe;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
   import org.apache.cocoon.xml.XMLProducer;
  @@ -41,7 +40,7 @@
   /**
    * Copy of code from XIncludeTransformer as a starting point for XIncludeSAXConnector.
    * @author <a href="dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/04/26 19:24:57 $
  + * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/04/26 21:12:07 $
    */
   public class XIncludeSAXConnector extends AbstractXMLPipe implements Composable, Recyclable,
SAXConnector, Disposable {
   
  @@ -155,8 +154,7 @@
       protected void processXIncludeElement(String src, String element, String ns, String
prefix)
           throws SAXException,MalformedURLException,IOException {
   
  -        ComponentSelector selector = null;
  -        Sitemap sitemap = null;
  +        Manager sitemap = null;
           EventPipeline eventPipeline = null;
           StreamPipeline pipeline = null;
           if (element == null) element="";
  @@ -164,8 +162,7 @@
           if (prefix == null) prefix="";
   
           try {
  -            selector = (ComponentSelector) manager.lookup(Roles.SERVERPAGES);
  -            sitemap = (Sitemap) selector.select("sitemap");
  +            sitemap = (Manager) manager.lookup(Roles.SITEMAP_MANAGER);
               getLogger().debug("Processing XInclude element: src=" + src
                                   + ", sitemap=" + sitemap
                                   + ", element=" + element
  @@ -184,7 +181,8 @@
               ((XMLProducer)eventPipeline).setConsumer(consumer);
   
               this.environment.pushURI(src);
  -            sitemap.process(this.environment, pipeline, eventPipeline);
  +            sitemap.invoke(this.environment, "", src, true, true, pipeline, eventPipeline);
  +            //sitemap.process(this.environment, pipeline, eventPipeline);
               eventPipeline.process(this.environment);
               this.environment.popURI();
   
  @@ -193,11 +191,8 @@
           } catch (Exception e) {
               getLogger().error("Error selecting sitemap",e);
           } finally {
  -            if (selector != null) {
  -                if (sitemap != null)
  -                    selector.release((Component)sitemap);
  -                this.manager.release((Component)selector);
  -            }
  +            if (sitemap != null)
  +                this.manager.release((Component)sitemap);
               if(eventPipeline != null)
                   this.manager.release((Component)eventPipeline);
               if(pipeline != null)
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.19  +4 -2      xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Manager.java
  
  Index: Manager.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Manager.java,v
  retrieving revision 1.1.2.18
  retrieving revision 1.1.2.19
  diff -u -r1.1.2.18 -r1.1.2.19
  --- Manager.java	2001/04/25 17:08:46	1.1.2.18
  +++ Manager.java	2001/04/26 21:12:09	1.1.2.19
  @@ -12,6 +12,7 @@
   import java.net.MalformedURLException;
   import java.util.HashMap;
   import java.util.Iterator;
  +import org.apache.avalon.component.Component;
   import org.apache.avalon.component.ComponentManager;
   import org.apache.avalon.component.Composable;
   import org.apache.avalon.configuration.Configurable;
  @@ -20,6 +21,7 @@
   import org.apache.avalon.context.ContextException;
   import org.apache.avalon.context.Contextualizable;
   import org.apache.avalon.logger.AbstractLoggable;
  +import org.apache.avalon.thread.ThreadSafe;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.pipeline.EventPipeline;
  @@ -35,9 +37,9 @@
    * checking regeneration of the sub <code>Sitemap</code>
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.18 $ $Date: 2001/04/25 17:08:46 $
  + * @version CVS $Revision: 1.1.2.19 $ $Date: 2001/04/26 21:12:09 $
    */
  -public class Manager extends AbstractLoggable implements Configurable, Composable, Contextualizable
{
  +public class Manager extends AbstractLoggable implements Component, Configurable, Composable,
Contextualizable, ThreadSafe {
   
       private Context context;
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message