bloritsch    01/06/08 13:21:27

  Modified:    src/org/apache/cocoon Tag: cocoon_20_branch Cocoon.java
               src/org/apache/cocoon/components/pipeline Tag:
                        cocoon_20_branch CachingEventPipeline.java
                        CachingStreamPipeline.java
               src/org/apache/cocoon/sitemap Tag: cocoon_20_branch
                        AbstractSitemap.java SitemapComponentSelector.java
  Log:
  Fix updates, and relax contract on SitemapComponentManager--it was causing things
  to not function correctly.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.5   +2 -3      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.9.2.4
  retrieving revision 1.9.2.5
  diff -u -r1.9.2.4 -r1.9.2.5
  --- Cocoon.java       2001/06/08 18:07:34     1.9.2.4
  +++ Cocoon.java       2001/06/08 20:21:23     1.9.2.5
  @@ -55,7 +55,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Pierpaolo Fumagalli</a> (Apache 
Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.9.2.4 $ $Date: 2001/06/08 18:07:34 $
  + * @version CVS $Revision: 1.9.2.5 $ $Date: 2001/06/08 20:21:23 $
    */
   public class Cocoon extends AbstractLoggable implements ThreadSafe, Component, 
Initializable, Disposable, Modifiable, Processor, Contextualizable {
       /** The application context */
  @@ -315,9 +315,8 @@
       }
   
       public void dispose() {
  -        this.disposed = true;
  -
           this.componentManager.dispose();
  +        this.disposed = true;
       }
   
       /**
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.4   +2 -2      
xml-cocoon2/src/org/apache/cocoon/components/pipeline/CachingEventPipeline.java
  
  Index: CachingEventPipeline.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/pipeline/CachingEventPipeline.java,v
  retrieving revision 1.7.2.3
  retrieving revision 1.7.2.4
  diff -u -r1.7.2.3 -r1.7.2.4
  --- CachingEventPipeline.java 2001/06/08 15:02:17     1.7.2.3
  +++ CachingEventPipeline.java 2001/06/08 20:21:24     1.7.2.4
  @@ -52,7 +52,7 @@
    * does not cache! (If it would cache, the response would be cached twice!)
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.7.2.3 $ $Date: 2001/06/08 15:02:17 $
  + * @version CVS $Revision: 1.7.2.4 $ $Date: 2001/06/08 20:21:24 $
    */
   public final class CachingEventPipeline
   extends AbstractEventPipeline
  @@ -401,8 +401,8 @@
       }
   
       public void dispose() {
  -        super.dispose();
           if(this.eventCache != null)
               this.manager.release((Component)this.eventCache);
  +        super.dispose();
       }
   }
  
  
  
  1.3.2.5   +2 -2      
xml-cocoon2/src/org/apache/cocoon/components/pipeline/CachingStreamPipeline.java
  
  Index: CachingStreamPipeline.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/pipeline/CachingStreamPipeline.java,v
  retrieving revision 1.3.2.4
  retrieving revision 1.3.2.5
  diff -u -r1.3.2.4 -r1.3.2.5
  --- CachingStreamPipeline.java        2001/06/08 16:44:40     1.3.2.4
  +++ CachingStreamPipeline.java        2001/06/08 20:21:25     1.3.2.5
  @@ -45,7 +45,7 @@
    *  </ul>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.3.2.4 $ $Date: 2001/06/08 16:44:40 $
  + * @version CVS $Revision: 1.3.2.5 $ $Date: 2001/06/08 20:21:25 $
    */
   public class CachingStreamPipeline extends AbstractStreamPipeline {
   
  @@ -65,9 +65,9 @@
       }
   
       public void dispose() {
  -        super.dispose();
           if (this.streamCache != null)
               this.manager.release((Component)this.streamCache);
  +        super.dispose();
       }
   
       /** Set the serializer.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.7   +15 -11    xml-cocoon2/src/org/apache/cocoon/sitemap/AbstractSitemap.java
  
  Index: AbstractSitemap.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/sitemap/AbstractSitemap.java,v
  retrieving revision 1.4.2.6
  retrieving revision 1.4.2.7
  diff -u -r1.4.2.6 -r1.4.2.7
  --- AbstractSitemap.java      2001/06/08 18:07:37     1.4.2.6
  +++ AbstractSitemap.java      2001/06/08 20:21:26     1.4.2.7
  @@ -43,7 +43,7 @@
    * Base class for generated <code>Sitemap</code> classes
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
  - * @version CVS $Revision: 1.4.2.6 $ $Date: 2001/06/08 18:07:37 $
  + * @version CVS $Revision: 1.4.2.7 $ $Date: 2001/06/08 20:21:26 $
    */
   public abstract class AbstractSitemap extends AbstractLoggable implements Sitemap, 
Disposable, ThreadSafe {
       private Context context;
  @@ -91,7 +91,11 @@
           this.manager.setRoleManager(AbstractSitemap.roleManager);
   
           try {
  -            this.manager.configure(AbstractSitemap.defaultConfig);
  +            if (AbstractSitemap.defaultConfig != null) {
  +                this.manager.configure(AbstractSitemap.defaultConfig);
  +                AbstractSitemap.defaultConfig = null;
  +            }
  +
               this.urlFactory = (URLFactory)manager.lookup(Roles.URL_FACTORY);
   
               // Create Sitemap Selectors
  @@ -103,6 +107,15 @@
               this.matchers = new SitemapComponentSelector();
               this.selectors = new SitemapComponentSelector();
   
  +            // Setup the Selectors
  +            this.setupSelector(this.generators);
  +            this.setupSelector(this.transformers);
  +            this.setupSelector(this.serializers);
  +            this.setupSelector(this.readers);
  +            this.setupSelector(this.actions);
  +            this.setupSelector(this.matchers);
  +            this.setupSelector(this.selectors);
  +
               // Set Parent Sitemap Selectors
               try {
                   this.generators.setParentSelector((SitemapComponentSelector) 
this.manager.lookup(Roles.GENERATORS));
  @@ -118,15 +131,6 @@
                    * properly
                    */
               }
  -
  -            // Setup the Selectors
  -            this.setupSelector(this.generators);
  -            this.setupSelector(this.transformers);
  -            this.setupSelector(this.serializers);
  -            this.setupSelector(this.readers);
  -            this.setupSelector(this.actions);
  -            this.setupSelector(this.matchers);
  -            this.setupSelector(this.selectors);
   
               // Add the Selectors
               this.manager.addComponentInstance(Roles.GENERATORS, this.generators);
  
  
  
  1.2.2.5   +2 -4      
xml-cocoon2/src/org/apache/cocoon/sitemap/SitemapComponentSelector.java
  
  Index: SitemapComponentSelector.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/sitemap/SitemapComponentSelector.java,v
  retrieving revision 1.2.2.4
  retrieving revision 1.2.2.5
  diff -u -r1.2.2.4 -r1.2.2.5
  --- SitemapComponentSelector.java     2001/06/08 17:53:33     1.2.2.4
  +++ SitemapComponentSelector.java     2001/06/08 20:21:26     1.2.2.5
  @@ -23,12 +23,11 @@
   /** Default component manager for Cocoon's sitemap components.
    * @author <a href="mailto:[EMAIL PROTECTED]";>Berin Loritsch</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
  - * @version CVS $Id: SitemapComponentSelector.java,v 1.2.2.4 2001/06/08 17:53:33 
bloritsch Exp $
  + * @version CVS $Id: SitemapComponentSelector.java,v 1.2.2.5 2001/06/08 20:21:26 
bloritsch Exp $
    */
   public class SitemapComponentSelector extends ExcaliburComponentSelector {
       private Map mime_types;
       private ComponentSelector parentSelector;
  -    private boolean initialized = false;
   
       /** The conctructors (same as the Avalon ComponentManager)
        */
  @@ -38,7 +37,7 @@
       }
   
       public void setParentSelector(ComponentSelector newSelector) {
  -        if ((! this.initialized) && this.parentSelector == null) {
  +        if (this.parentSelector == null) {
               this.parentSelector = newSelector;
           }
       }
  @@ -62,7 +61,6 @@
       public void initialize() {
           super.initialize();
           this.mime_types = Collections.unmodifiableMap(this.mime_types);
  -        this.initialized = true;
       }
   
       public String getMimeTypeForRole(String role) {
  
  
  

----------------------------------------------------------------------
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