cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/selection MediaSelector.java
Date Tue, 21 Oct 2003 12:39:17 GMT
cziegeler    2003/10/21 05:39:17

  Modified:    src/documentation/xdocs/developing/webapps
                        authentication.xml
               src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context
                        StandardSessionContextProvider.java
                        RequestSessionContext.java SessionContext.java
                        SimpleSessionContext.java
               src/java/org/apache/cocoon/transformation
                        SourceWritingTransformer.java
                        CIncludeTransformer.java
                        AbstractSAXTransformer.java
               src/blocks/linkrewriter/java/org/apache/cocoon/transformation
                        VariableRewriterTransformer.java
                        LinkRewriterTransformer.java
               src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/context
                        AuthenticationContextProvider.java
                        AuthenticationContext.java
               src/blocks/portal/java/org/apache/cocoon/portal/transformation
                        NewEventLinkTransformer.java
                        EventLinkTransformer.java
                        AbstractCopletTransformer.java RSSTransformer.java
               src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components
                        DefaultSessionManager.java
                        DefaultContextManager.java DefaultFormManager.java
               src/documentation/xdocs/plan updating.xml
               src/blocks/databases/java/org/apache/cocoon/transformation
                        SQLTransformer.java
               src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation
                        AbstractSessionTransformer.java
               src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context
                        SessionContextImpl.java
               src/blocks/session-fw/java/org/apache/cocoon/webapps/session/selection
                        MediaSelector.java
  Log:
  Moving to Serviceable
  
  Revision  Changes    Path
  1.5       +1 -2      cocoon-2.1/src/documentation/xdocs/developing/webapps/authentication.xml
  
  Index: authentication.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/developing/webapps/authentication.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- authentication.xml	12 Oct 2003 15:19:26 -0000	1.4
  +++ authentication.xml	21 Oct 2003 12:39:15 -0000	1.5
  @@ -679,8 +679,7 @@
           <p>In the example above, if the user is already logged he is
             redirected to the <em>loggedInStartPage</em> document. If he is not logged in
             for the given handler, the usual start page is generated.</p>
  -        <p>Both actions, the <em>auth-protect</em> and the
  -          <em>auth-loggedIn</em> action return - if the user is logged in for the
  +        <p>The <em>auth-protect</em> action returns - if the user is logged in for the
             given handler - all values from the context to the sitemap, e.g. ID, role etc.
             These values can be used within the other components:</p>
           <source>&lt;map:match pattern"protected"&gt;
  
  
  
  1.6       +8 -8      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/StandardSessionContextProvider.java
  
  Index: StandardSessionContextProvider.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/StandardSessionContextProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardSessionContextProvider.java	4 Jul 2003 10:46:29 -0000	1.5
  +++ StandardSessionContextProvider.java	21 Oct 2003 12:39:15 -0000	1.6
  @@ -53,13 +53,13 @@
   import java.util.Map;
   
   import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.ContextHelper;
  @@ -75,11 +75,11 @@
   */
   public final class StandardSessionContextProvider
   extends AbstractLogEnabled
  -implements SessionContextProvider, ThreadSafe, Contextualizable, Composable, Component {
  +implements SessionContextProvider, ThreadSafe, Contextualizable, Serviceable, Component {
   
       protected Context context;
       
  -    protected ComponentManager manager;
  +    protected ServiceManager manager;
       
       /**
        * Get the context
  @@ -138,9 +138,9 @@
       }
   
       /* (non-Javadoc)
  -     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  +     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  
  
  
  1.3       +12 -13    cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java
  
  Index: RequestSessionContext.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RequestSessionContext.java	4 May 2003 20:19:40 -0000	1.2
  +++ RequestSessionContext.java	21 Oct 2003 12:39:15 -0000	1.3
  @@ -55,9 +55,8 @@
   import java.util.Enumeration;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.Cookie;
   import org.apache.cocoon.environment.ObjectModelHelper;
  @@ -176,7 +175,7 @@
       /**
        * Set the Request
        */
  -    public void setup(Map objectModel, ComponentManager manager)
  +    public void setup(Map objectModel, ServiceManager manager)
       throws ProcessingException {
           this.request = ObjectModelHelper.getRequest(objectModel);
   
  @@ -189,10 +188,10 @@
           try {
               parser = (SAXParser) manager.lookup( SAXParser.ROLE );
               this.buildParameterXML(root, parser);
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               throw new ProcessingException("Unable to lookup parser.", ce);
           } finally {
  -            manager.release( (Component)parser );
  +            manager.release(parser );
           }
           this.buildAttributesXML(root);
           this.buildMiscXML(root);
  @@ -689,9 +688,9 @@
        */
       public void loadXML(String path,
                           SourceParameters parameters,
  -                        Map                objectModel,
  -                        SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        Map              objectModel,
  +                        SourceResolver   resolver,
  +                        ServiceManager   manager)
       throws SAXException, ProcessingException, IOException {
           throw new ProcessingException("The context " + this.name + " does not support loading.");
       }
  @@ -703,9 +702,9 @@
        */
       public void saveXML(String path,
                           SourceParameters parameters,
  -                        Map                objectModel,
  -                        SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        Map              objectModel,
  +                        SourceResolver   resolver,
  +                        ServiceManager   manager)
       throws SAXException, ProcessingException, IOException {
           throw new ProcessingException("The context " + this.name + " does not support saving.");
       }
  
  
  
  1.2       +8 -8      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/SessionContext.java
  
  Index: SessionContext.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/SessionContext.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SessionContext.java	9 Mar 2003 00:06:10 -0000	1.1
  +++ SessionContext.java	21 Oct 2003 12:39:15 -0000	1.2
  @@ -62,7 +62,7 @@
   import org.xml.sax.ContentHandler;
   import org.xml.sax.ext.LexicalHandler;
   import org.apache.excalibur.source.SourceParameters;
  -import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.excalibur.source.SourceResolver;
   
  @@ -211,9 +211,9 @@
        */
       void loadXML(String path,
                    SourceParameters parameters,
  -                 Map                objectModel,
  -                 SourceResolver     resolver,
  -                 ComponentManager   manager)
  +                 Map              objectModel,
  +                 SourceResolver   resolver,
  +                 ServiceManager   manager)
       throws SAXException, ProcessingException, IOException;
   
       /**
  @@ -223,8 +223,8 @@
        */
       void saveXML(String path,
                    SourceParameters parameters,
  -                 Map                objectModel,
  -                 SourceResolver     resolver,
  -                 ComponentManager   manager)
  +                 Map              objectModel,
  +                 SourceResolver   resolver,
  +                 ServiceManager   manager)
       throws SAXException, ProcessingException, IOException;
   }
  
  
  
  1.6       +9 -9      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/SimpleSessionContext.java
  
  Index: SimpleSessionContext.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/SimpleSessionContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SimpleSessionContext.java	4 May 2003 20:19:40 -0000	1.5
  +++ SimpleSessionContext.java	21 Oct 2003 12:39:15 -0000	1.6
  @@ -54,7 +54,7 @@
   import java.util.HashMap;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
  @@ -487,10 +487,10 @@
        * an exception is thrown.
        */
       public void loadXML(String            path,
  -                        SourceParameters   parameters,
  -                        Map                objectModel,
  -                        SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        SourceParameters  parameters,
  +                        Map               objectModel,
  +                        SourceResolver    resolver,
  +                        ServiceManager    manager)
       throws SAXException, ProcessingException, IOException {
           if (this.loadResource == null) {
               throw new ProcessingException("The context " + this.name + " does not support loading.");
  @@ -516,9 +516,9 @@
        */
       public void saveXML(String path,
                           SourceParameters parameters,
  -                        Map                objectModel,
  -                        SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        Map              objectModel,
  +                        SourceResolver   resolver,
  +                        ServiceManager   manager)
       throws SAXException, ProcessingException, IOException {
           if (this.saveResource == null) {
               throw new ProcessingException("The context " + this.name + " does not support saving.");
  
  
  
  1.8       +8 -9      cocoon-2.1/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java
  
  Index: SourceWritingTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SourceWritingTransformer.java	23 Sep 2003 12:26:58 -0000	1.7
  +++ SourceWritingTransformer.java	21 Oct 2003 12:39:16 -0000	1.8
  @@ -54,12 +54,11 @@
   import java.io.OutputStream;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentSelector;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceSelector;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.environment.SourceResolver;
  @@ -667,7 +666,7 @@
                                       try {
                                           resource = parser.createDocument();
                                       } finally {
  -                                        this.manager.release( (Component)parser );
  +                                        this.manager.release( parser );
                                       }
   
                                       resource.appendChild(resource.importNode(importNode, true));
  @@ -706,7 +705,7 @@
                   try {
                       resource = parser.createDocument();
                   } finally {
  -                    this.manager.release( (Component)parser );
  +                    this.manager.release( parser );
                   }
                   // import the fragment
                   Node importNode = resource.importNode(fragment, true);
  @@ -733,11 +732,11 @@
                   if (localSerializer == null) localSerializer = this.configuredSerializerName;
                   if (localSerializer != null) {
                       // Lookup the Serializer
  -                    ComponentSelector selector = null;
  +                    ServiceSelector selector = null;
                       Serializer serializer = null;
                       OutputStream oStream = null;
                       try {
  -                        selector = (ComponentSelector)manager.lookup(Serializer.ROLE + "Selector");
  +                        selector = (ServiceSelector)manager.lookup(Serializer.ROLE + "Selector");
                           serializer = (Serializer)selector.select(localSerializer);
                           oStream = ws.getOutputStream();
                           serializer.setOutputStream(oStream);
  @@ -775,7 +774,7 @@
                   getLogger().debug("FAIL exception: "+de, de);
               }
               message = "There was a problem manipulating your document: " + de;
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               if (getLogger().isDebugEnabled()) {
                   getLogger().debug("FAIL exception: "+ce, ce);
               }
  
  
  
  1.7       +14 -15    cocoon-2.1/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java
  
  Index: CIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CIncludeTransformer.java	24 Sep 2003 21:41:12 -0000	1.6
  +++ CIncludeTransformer.java	21 Oct 2003 12:39:16 -0000	1.7
  @@ -52,10 +52,9 @@
   
   import org.apache.excalibur.xml.xpath.XPathProcessor;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.sax.XMLDeserializer;
  @@ -230,11 +229,11 @@
       }
   
       /**
  -     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  +     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        super.compose(manager);
  -        if ( this.manager.hasComponent( IncludeCacheManager.ROLE )) {
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
  +        if ( this.manager.hasService( IncludeCacheManager.ROLE )) {
               this.cacheManager = (IncludeCacheManager) this.manager.lookup( IncludeCacheManager.ROLE );
           } else {
               this.getLogger().warn("The cinclude transformer cannot find the IncludeCacheManager. Therefore caching is turned off for the include transformer.");
  @@ -246,7 +245,7 @@
        */
       public void dispose() {
           if ( null != this.manager ) {
  -            this.manager.release( (Component)this.cacheManager );
  +            this.manager.release( this.cacheManager );
               this.manager = null;
           }
       }
  @@ -393,7 +392,7 @@
                       }
                   } catch (ProcessingException pe) {
                       if (!ignoreErrors) throw pe;
  -                } catch (ComponentException ignore) {
  +                } catch (ServiceException ignore) {
                   } finally {
                       this.manager.release( serializer );
                       this.manager.release( deserializer );
  @@ -551,8 +550,8 @@
                                                  this);
                       }
                   } finally {
  -                    this.manager.release((Component)parser);
  -                    this.manager.release((Component)processor);
  +                    this.manager.release(parser);
  +                    this.manager.release(processor);
                   }
               } else {
                   String mimeType = null;
  @@ -573,7 +572,7 @@
               throw new SAXException("CIncludeTransformer could not read resource", e);
           } catch (ProcessingException e){
               throw new SAXException("Exception in CIncludeTransformer",e);
  -        } catch(ComponentException e) {
  +        } catch(ServiceException e) {
               throw new SAXException(e);
           } finally {
               this.resolver.release(source);
  @@ -605,7 +604,7 @@
               
               this.addRecorder(recorder);
     
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               throw new SAXException("Unable to lookup xml serializer for compiling xml.", ce);
           }
           if (this.getLogger().isDebugEnabled()) {
  @@ -651,7 +650,7 @@
                   deserializer = (XMLDeserializer)this.manager.lookup(XMLDeserializer.ROLE);
                   deserializer.setConsumer(this.filter);
                   deserializer.deserialize(compiledXML);
  -            } catch (ComponentException ce) {
  +            } catch (ServiceException ce) {
                   throw new SAXException("Unable to lookup xml deserializer.", ce);
               } finally {
                   this.manager.release( deserializer );
  
  
  
  1.6       +10 -10    cocoon-2.1/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java
  
  Index: AbstractSAXTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractSAXTransformer.java	9 Aug 2003 19:48:54 -0000	1.5
  +++ AbstractSAXTransformer.java	21 Oct 2003 12:39:16 -0000	1.6
  @@ -51,13 +51,13 @@
   package org.apache.cocoon.transformation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.Context;
   import org.apache.cocoon.environment.ObjectModelHelper;
  @@ -125,7 +125,7 @@
   */
   public abstract class AbstractSAXTransformer
   extends AbstractTransformer
  -implements Composable, Configurable, Recyclable {
  +implements Serviceable, Configurable, Recyclable {
   
       /** Controlls SAX event handling.
        *  If set to true all whitespace events are ignored.
  @@ -183,8 +183,8 @@
       protected Parameters         parameters;
       /** The source attribute specified in the sitemap */
       protected String             source;
  -    /** The Avalon ComponentManager for getting Components */
  -    protected ComponentManager   manager;
  +    /** The Avalon ServiceManager for getting Components */
  +    protected ServiceManager   manager;
       /** The SourceResolver for this request */
       protected SourceResolver     resolver;
   
  @@ -276,10 +276,10 @@
       }
   
       /**
  -     * Avalon Composable Interface
  -     * @param manager The Avalon Component Manager
  +     * Avalon Serviceable Interface
  +     * @param manager The Avalon Service Manager
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  
  
  
  1.5       +16 -3     cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java
  
  Index: VariableRewriterTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- VariableRewriterTransformer.java	24 Sep 2003 22:04:40 -0000	1.4
  +++ VariableRewriterTransformer.java	21 Oct 2003 12:39:16 -0000	1.5
  @@ -58,6 +58,9 @@
   import java.util.StringTokenizer;
   
   import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -172,7 +175,7 @@
    * @version CVS $Id$
    */
   public class VariableRewriterTransformer
  -    extends AbstractSAXTransformer implements Initializable, Configurable
  +    extends AbstractSAXTransformer implements Composable, Initializable, Configurable
   {
   
       private static String NAMESPACE="";
  @@ -195,6 +198,8 @@
   
       private String badLinkStr;
   
  +    private ComponentManager componentManager;
  +
       /**
        * Configure this component from the map:transformer block.  Called before
        * initialization and setup.
  @@ -210,7 +215,7 @@
       public void initialize() throws Exception {
           this.namespaceURI = NAMESPACE;
           this.modHelper = new XSPModuleHelper();
  -        modHelper.setup(this.manager);
  +        modHelper.setup(this.componentManager);
       }
   
       /**
  @@ -373,4 +378,12 @@
           // Note: configure() and initialize() are not called after every
           //recycle, so don't null origConf
       }
  +    
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  +     */
  +    public void compose(ComponentManager manager) throws ComponentException {
  +        this.componentManager = manager;
  +    }
  +    
   }
  
  
  
  1.9       +15 -3     cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java
  
  Index: LinkRewriterTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LinkRewriterTransformer.java	24 Sep 2003 22:04:40 -0000	1.8
  +++ LinkRewriterTransformer.java	21 Oct 2003 12:39:16 -0000	1.9
  @@ -58,6 +58,9 @@
   import java.util.StringTokenizer;
   
   import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -182,7 +185,7 @@
    * @version CVS $Id$
    */
   public class LinkRewriterTransformer
  -    extends AbstractSAXTransformer implements Initializable, Configurable
  +    extends AbstractSAXTransformer implements Composable, Initializable, Configurable
   {
   
       private static String NAMESPACE="";
  @@ -205,6 +208,8 @@
   
       private String badLinkStr;
   
  +    private ComponentManager componentManager;
  +    
       /**
        * Configure this component from the map:transformer block.  Called before
        * initialization and setup.
  @@ -221,7 +226,7 @@
       public void initialize() throws Exception {
           this.namespaceURI = NAMESPACE;
           this.modHelper = new XSPModuleHelper();
  -        modHelper.setup(this.manager);
  +        modHelper.setup(this.componentManager);
       }
   
       /**
  @@ -392,6 +397,13 @@
               }
           }
           return null;
  +    }
  +
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  +     */
  +    public void compose(ComponentManager manager) throws ComponentException {
  +        this.componentManager = manager;
       }
   
   }
  
  
  
  1.6       +10 -10    cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/context/AuthenticationContextProvider.java
  
  Index: AuthenticationContextProvider.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/context/AuthenticationContextProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AuthenticationContextProvider.java	23 May 2003 12:35:32 -0000	1.5
  +++ AuthenticationContextProvider.java	21 Oct 2003 12:39:16 -0000	1.6
  @@ -51,10 +51,10 @@
   package org.apache.cocoon.webapps.authentication.context;
   
   import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.webapps.authentication.AuthenticationManager;
  @@ -72,9 +72,9 @@
   */
   public final class AuthenticationContextProvider
   extends AbstractLogEnabled
  -implements SessionContextProvider, ThreadSafe, Component, Composable {
  +implements SessionContextProvider, ThreadSafe, Component, Serviceable {
   
  -    protected ComponentManager manager;
  +    protected ServiceManager manager;
       
       /**
        * Get the context
  @@ -92,9 +92,9 @@
               try {
                   authManager = (AuthenticationManager)this.manager.lookup(AuthenticationManager.ROLE);
                   state = authManager.getState();
  -            } catch (ComponentException ignore) {
  +            } catch (ServiceException ignore) {
               } finally {
  -                this.manager.release( (Component)authManager );
  +                this.manager.release( authManager );
               }
               
               if ( null != state ) {
  @@ -116,9 +116,9 @@
       }
   
       /* (non-Javadoc)
  -     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
  +     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
        */
  -    public void compose(ComponentManager manager)  {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  
  
  
  1.11      +10 -10    cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/context/AuthenticationContext.java
  
  Index: AuthenticationContext.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/context/AuthenticationContext.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AuthenticationContext.java	25 Sep 2003 17:28:38 -0000	1.10
  +++ AuthenticationContext.java	21 Oct 2003 12:39:16 -0000	1.11
  @@ -55,9 +55,9 @@
   import java.util.Map;
   
   import org.apache.avalon.framework.CascadingRuntimeException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.webapps.authentication.AuthenticationConstants;
  @@ -485,9 +485,9 @@
        */
       public void loadXML(String path,
                           SourceParameters parameters,
  -                        Map                objectModel,
  -                        SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        Map              objectModel,
  +                        SourceResolver   resolver,
  +                        ServiceManager   manager)
       throws SAXException, ProcessingException, IOException {
           if (!path.startsWith("/") ) path = '/' + path;
   
  @@ -540,7 +540,7 @@
                           SourceParameters parameters,
                           Map                objectModel,
                           SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        ServiceManager   manager)
       throws SAXException, ProcessingException, IOException {
           if (!path.startsWith("/") ) path = '/' + path;
   
  @@ -601,7 +601,7 @@
                                          SourceParameters parameters,
                                          Map                objectModel,
                                          SourceResolver     resolver,
  -                                       ComponentManager   manager)
  +                                       ServiceManager   manager)
       throws ProcessingException {
           String authSaveResource = this.handler.getHandlerConfiguration().getSaveResource();
           SourceParameters authSaveResourceParameters = this.handler.getHandlerConfiguration().getSaveResourceParameters();
  @@ -641,7 +641,7 @@
                                          SourceParameters parameters,
                                          Map                objectModel,
                                          SourceResolver     resolver,
  -                                       ComponentManager   manager)
  +                                       ServiceManager   manager)
       throws ProcessingException {
           String authLoadResource = this.handler.getHandlerConfiguration().getLoadResource();
           SourceParameters authLoadResourceParameters = this.handler.getHandlerConfiguration().getLoadResourceParameters();
  @@ -680,7 +680,7 @@
                                       SourceParameters parameters,
                                       Map                objectModel,
                                       SourceResolver     resolver,
  -                                    ComponentManager   manager)
  +                                    ServiceManager   manager)
       throws ProcessingException {
           final String applicationName = this.getState().getApplicationName();
   
  @@ -720,7 +720,7 @@
                                       SourceParameters parameters,
                                       Map                objectModel,
                                       SourceResolver     resolver,
  -                                    ComponentManager   manager)
  +                                    ServiceManager   manager)
       throws ProcessingException {
           final String applicationName = this.getState().getApplicationName();
           final ApplicationConfiguration conf = (ApplicationConfiguration)this.handler.getHandlerConfiguration().getApplications().get( applicationName );
  
  
  
  1.3       +3 -3      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
  
  Index: NewEventLinkTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NewEventLinkTransformer.java	24 Sep 2003 21:22:33 -0000	1.2
  +++ NewEventLinkTransformer.java	21 Oct 2003 12:39:16 -0000	1.3
  @@ -52,7 +52,7 @@
   
   import java.util.Stack;
   
  -import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.portal.LinkService;
   import org.apache.cocoon.portal.coplet.CopletInstanceData;
   import org.apache.cocoon.portal.event.impl.CopletLinkEvent;
  @@ -245,7 +245,7 @@
                   // insert event link
                   newAttributes.setValue(index, eventLink);
               }
  -            catch (ComponentException e) {
  +            catch (ServiceException e) {
                   throw new SAXException(e);
               }
               finally {
  
  
  
  1.6       +4 -4      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/EventLinkTransformer.java
  
  Index: EventLinkTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/EventLinkTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EventLinkTransformer.java	10 Jul 2003 13:17:04 -0000	1.5
  +++ EventLinkTransformer.java	21 Oct 2003 12:39:16 -0000	1.6
  @@ -52,7 +52,7 @@
   
   import java.util.Stack;
   
  -import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.portal.LinkService;
   import org.apache.cocoon.portal.coplet.CopletInstanceData;
   import org.apache.cocoon.portal.event.impl.CopletLinkEvent;
  @@ -214,7 +214,7 @@
           
                               // insert event link
                               attr.setValue(index, eventLink);
  -                        } catch (ComponentException e) {
  +                        } catch (ServiceException e) {
                               throw new SAXException(e);
                           } finally {
                               this.manager.release(linkService);
  @@ -237,7 +237,7 @@
                           // create event link
                           CopletLinkEvent event = new CopletLinkEvent(cid, link);
                           eventLink = linkService.getLinkURI(event);
  -                    } catch (ComponentException e) {
  +                    } catch (ServiceException e) {
                           throw new SAXException(e);
                       } finally {
                           this.manager.release(linkService);
  
  
  
  1.4       +3 -3      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/AbstractCopletTransformer.java
  
  Index: AbstractCopletTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/AbstractCopletTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractCopletTransformer.java	18 Jul 2003 14:41:46 -0000	1.3
  +++ AbstractCopletTransformer.java	21 Oct 2003 12:39:16 -0000	1.4
  @@ -52,8 +52,8 @@
   
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.ParameterException;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.portal.Constants;
   import org.apache.cocoon.portal.PortalService;
  @@ -128,7 +128,7 @@
               }
                   
               return object;
  -        } catch (ComponentException e) {
  +        } catch (ServiceException e) {
               throw new SAXException("Error getting portal service.", e);
           } finally {
               this.manager.release( portalService );
  
  
  
  1.4       +4 -5      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/RSSTransformer.java
  
  Index: RSSTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/RSSTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RSSTransformer.java	12 Jul 2003 14:21:06 -0000	1.3
  +++ RSSTransformer.java	21 Oct 2003 12:39:16 -0000	1.4
  @@ -55,9 +55,8 @@
   import java.io.InputStream;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.sax.XMLDeserializer;
   import org.apache.cocoon.components.sax.XMLSerializer;
  @@ -138,7 +137,7 @@
        * @see org.apache.avalon.excalibur.pool.Recyclable#recycle()
        */
       public void recycle() {
  -        this.manager.release( (Component) this.xmlizer );
  +        this.manager.release( this.xmlizer );
           this.manager.release( this.deserializer );
           this.xmlizer = null;
           this.deserializer = null;
  @@ -158,7 +157,7 @@
           try {
               this.xmlizer = (XMLizer)this.manager.lookup(XMLizer.ROLE);
               this.deserializer = (XMLDeserializer)this.manager.lookup(XMLDeserializer.ROLE);
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException ce) {
               throw new ProcessingException("Unable to lookup component.", ce);
           }
       }
  
  
  
  1.4       +15 -15    cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java
  
  Index: DefaultSessionManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultSessionManager.java	24 Sep 2003 21:22:33 -0000	1.3
  +++ DefaultSessionManager.java	21 Oct 2003 12:39:16 -0000	1.4
  @@ -52,13 +52,13 @@
   
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.ContextHelper;
  @@ -85,32 +85,32 @@
   */
   public final class DefaultSessionManager
   extends AbstractLogEnabled
  -implements Composable, Component, ThreadSafe, SessionManager, Disposable, Contextualizable {
  +implements Serviceable, Component, ThreadSafe, SessionManager, Disposable, Contextualizable {
   
       /** The context */
       private Context context;
       
  -    /** The <code>ComponentManager</code> */
  -    private ComponentManager manager;
  +    /** The <code>ServiceManager</code> */
  +    private ServiceManager manager;
   
       /** The context manager */
       private ContextManager contextManager;
       
       /**
  -     * Avalon Composable Interface
  -     */
  -    public void compose(ComponentManager manager) 
  -    throws ComponentException {
  -        this.manager = manager;
  -        this.contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);
  -    }
  +    * Avalon Serviceable Interface
  +    */
  +   public void service(ServiceManager manager) 
  +   throws ServiceException {
  +       this.manager = manager;
  +       this.contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);
  +   }
   
       /**
        * Avalon Disposable Interface
        */
       public void dispose() {
           if (this.manager != null ) {
  -            this.manager.release( (Component)this.contextManager);
  +            this.manager.release(this.contextManager);
               this.manager = null;
               this.contextManager = null;
           }
  
  
  
  1.4       +19 -19    cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultContextManager.java
  
  Index: DefaultContextManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultContextManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultContextManager.java	4 Aug 2003 03:06:31 -0000	1.3
  +++ DefaultContextManager.java	21 Oct 2003 12:39:16 -0000	1.4
  @@ -56,14 +56,14 @@
   
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.ComponentSelector;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.ServiceSelector;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.ContextHelper;
  @@ -83,27 +83,27 @@
   */
   public final class DefaultContextManager
   extends AbstractLogEnabled
  -implements Composable, ContextManager, ThreadSafe, Component, Contextualizable, Disposable {
  +implements Serviceable, ContextManager, ThreadSafe, Component, Contextualizable, Disposable {
   
  -    /** The <code>ComponentManager</code> */
  -    private ComponentManager manager;
  +    /** The <code>ServiceManager</code> */
  +    private ServiceManager manager;
   
       /** The context */
       private Context context;
       
       /** selector for context provider */
  -    private ComponentSelector contextSelector;
  +    private ServiceSelector contextSelector;
       
       /* The list of reserved contexts */
       static private final String[] reservedContextNames = {"session",
                                                               "context"};
       /**
  -     * Avalon Composer Interface
  +     * Avalon Serviceable Interface
        */
  -    public void compose(ComponentManager manager) 
  -    throws ComponentException {
  +    public void service(ServiceManager manager) 
  +    throws ServiceException {
           this.manager = manager;
  -        this.contextSelector = (ComponentSelector)this.manager.lookup(SessionContextProvider.ROLE+"Selector");
  +        this.contextSelector = (ServiceSelector)this.manager.lookup(SessionContextProvider.ROLE+"Selector");
       }
   
       /**
  @@ -147,9 +147,9 @@
               try {
                   provider = (SessionContextProvider)this.contextSelector.select( name );
                   found = true;
  -            } catch (ComponentException ignore) {
  +            } catch (ServiceException ignore) {
               } finally {
  -                this.contextSelector.release( (Component)provider);
  +                this.contextSelector.release(provider);
               }
           }
           return found;
  @@ -166,9 +166,9 @@
           try {
               provider = (SessionContextProvider)this.contextSelector.select( name );
               exists = provider.existsSessionContext( name );
  -        } catch (ComponentException ignore) {
  +        } catch (ServiceException ignore) {
           } finally {
  -            this.contextSelector.release( (Component)provider);
  +            this.contextSelector.release(provider);
           }
   
           return exists;
  @@ -187,9 +187,9 @@
               synchronized (provider) {
                   context = provider.getSessionContext(name);
               }
  -        } catch (ComponentException ignore) {
  +        } catch (ServiceException ignore) {
           } finally {
  -            this.contextSelector.release( (Component)provider);
  +            this.contextSelector.release(provider);
           }
   
           return context;
  
  
  
  1.5       +18 -18    cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultFormManager.java
  
  Index: DefaultFormManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultFormManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultFormManager.java	3 Jul 2003 08:00:00 -0000	1.4
  +++ DefaultFormManager.java	21 Oct 2003 12:39:16 -0000	1.5
  @@ -55,13 +55,13 @@
   import java.util.Map;
   
   import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.ContextHelper;
  @@ -83,26 +83,19 @@
   */
   public final class DefaultFormManager
   extends AbstractLogEnabled
  -implements Composable, Component, FormManager, ThreadSafe, Contextualizable
  +implements Serviceable, Component, FormManager, ThreadSafe, Contextualizable
        /*,RequestProcessingListener, SitemapProcessingListener*/ {
   
       /** This session attribute is used to store the information for the inputxml tags */
       private static final String ATTRIBUTE_INPUTXML_STORAGE = "org.apache.cocoon.webapps.session.InputXMLStorage";
   
  -    /** The <code>ComponentManager</code> */
  -    private ComponentManager manager;
  +    /** The <code>ServiceManager</code> */
  +    private ServiceManager manager;
   
       /** The context */
       private Context context;
       
       /**
  -     * Avalon Composer Interface
  -     */
  -    public void compose(ComponentManager manager) {
  -        this.manager = manager;
  -    }
  -
  -    /**
        * Get the context
        */
       private SessionContext getContext(String name) 
  @@ -111,10 +104,10 @@
           try {
               contextManager = (ContextManager) this.manager.lookup(ContextManager.ROLE);
               return contextManager.getContext( name );
  -        } catch (ComponentException ce ) {
  +        } catch (ServiceException ce ) {
               throw new ProcessingException("Unable to lookup context manager.", ce);
           } finally {
  -            this.manager.release( (Component) contextManager);
  +            this.manager.release(contextManager);
           }
       }
       
  @@ -124,10 +117,10 @@
           try {
               sessionManager = (SessionManager) this.manager.lookup(SessionManager.ROLE);
               return sessionManager.getContextFragment( context, path );
  -        } catch (ComponentException ce ) {
  +        } catch (ServiceException ce ) {
               throw new ProcessingException("Unable to lookup session manager.", ce);
           } finally {
  -            this.manager.release( (Component) sessionManager);
  +            this.manager.release(sessionManager);
           }        
       }
       
  @@ -268,6 +261,13 @@
        */
       public void contextualize(Context context) throws ContextException {
           this.context = context;
  +    }
  +
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
  +     */
  +    public void service(ServiceManager manager) throws ServiceException {
  +        this.manager = manager;
       }
   
   }
  
  
  
  1.2       +34 -111   cocoon-2.1/src/documentation/xdocs/plan/updating.xml
  
  Index: updating.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/plan/updating.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- updating.xml	20 Oct 2003 06:48:24 -0000	1.1
  +++ updating.xml	21 Oct 2003 12:39:16 -0000	1.2
  @@ -32,7 +32,15 @@
       If you follow the instructions of this document closely, however,
       you should be able to quickly upgrade your Cocoon 2.1.x installation.
      </p>
  -   
  +  </s1>
  +  <s1 title="Updating Your Application">
  +    <p>Currently, updating your application from an older version to the latest
  +     version of Cocoon has do be done manually (but we are working on a better
  +     solution!).</p>
  +    <p>We suggest you, that you start from a clean Cocoon installation and 
  +    incorporate your changes into the cocoon.xconf, the sitemap etc. This
  +    is in most cases much easier that starting with your old application
  +    and adapting it for Cocoon 2.2.x.</p>
     </s1>
     <s1 title="Recompilation">
       <p>
  @@ -64,101 +72,32 @@
         </ul>
       </s2>
     </s1>
  -  <!--
  -  <s1 title="Sitemap">
  -   <note>There are some changes in the sitemap and in the configuration of some
  -    components in the sitemap. In general we recommend you to start with a new
  -    sitemap from 2.1 and to adapt it to your needs. But for manual migration we
  -    will list as many changes as possible.</note>
  -   <s2 title="Pipelines configuration in the sitemap">
  -     <p>
  -      The configuration of the pipelines has moved from cocoon.xconf to the sitemap.
  -      To update your installation, you have to remove the "event-pipeline" and "stream-pipeline"
  -      section from your cocoon.xconf (see also the cocoon.xconf section) and add the
  -      <code>map:pipes</code> section to the <code>map:components</code> section
  -      of your sitemap. You can find the pipelines components definition in the sample
  -      main sitemap of Cocoon. Here is an example:
  -     </p>
  -     <source><![CDATA[
  -<map:sitemap>
  - <map:components>
  -      ...
  -  <map:pipes default="caching">
  -   <map:pipe name="caching"
  -    src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
  -   <map:pipe name="noncaching"
  -    src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
  -  </map:pipes>
  - </map:components>
  -   ...
  -</map:sitemap>
  -     ]]></source>
  -     <p>You can choose these different pipeline implementations
  -       in the <code>map:pipeline</code> section by specifying their <code>type</code> attribute:
  -     </p>
  -     <source><![CDATA[
  -<map:sitemap>
  -  ...
  - <map:pipelines>
  -  <map:pipeline type="noncaching">
  -   <map:match pattern="welcome">
  -                  ...
  -   </map:match>
  -            ..
  -  </map:pipeline>
  - </map:pipelines>
  -</map:sitemap>
  -     ]]></source>
  -     <p>This is similar to choosing the type of a generator or any other sitemap component.
  -       If the type attribute is omitted, the default configuration from the
  -       <code>map:components</code> section is used.
  -     </p>
  -   </s2>
  -   <s2 title="FOP Serializer">
  -    <p>Relative paths in FOP serializer's <code>&lt;user-config&gt;</code> are now resolved
  -      relatively to the directory that contains the sitemap.</p>
  -    <p>All Cocoon URIs are supported too.</p>
  -   </s2>
  -   <s2 title="Sitemap components">
  -    <p>Some of the sitemap components have been removed from Cocoon sources, others were renamed.
  -      If you have the old declaration in your sitemap, you will get
  -      <code>ClassNotFoundException</code>s. Trial and error will probably be the fastest way for
  -      removing them and getting a clean and working sitemap. Hopefully you are not using one of the
  -      removed components. The following components are known to be removed or renamed:</p>
  -    <ul>
  -     <li>
  -      <code>o.a.c.XTTransformer</code> - use the TraxTransformer instead.
  -     </li>
  -     <li>
  -      <code>o.a.c.webapps.authentication.selection.MediaSelector</code> - the full qualified class
  -      name has changed to <code>o.a.c.webapps.session.selection.MediaSelector</code>.
  -     </li>
  -    </ul>
  -   </s2>
  -   <s2 title="Error handling">
  -     <p>The <code>map:handle-errors</code> section must now be a complete pipeline. This means the
  -       old form</p>
  -     <source><![CDATA[
  -    <map:handle-errors>
  -      <map:transform src="stylesheets/system/error2html.xsl"/>
  -      <map:serialize status-code="404"/>
  -    </map:handle-errors>
  -  ]]></source>
  -     <p>is no longer valid, because the generator is missing. Therefore you can now describe
  -     explicitely the error handling. The replacement of the above looks like the following:</p>
  -     <source><![CDATA[
  -    <map:handle-errors>
  -      <map:generate type="notifying"/>
  -      <map:transform src="stylesheets/system/error2html.xsl"/>
  -      <map:serialize status-code="404"/>
  -    </map:handle-errors>
  -  ]]></source>
  -     <p>For a more detailed example have a look into the default sitemap delivered with Cocoon
  -       sources or read the
  -       <link href="../userdocs/concepts/errorhandling.html">documentation on error handling</link>.
  -     </p>
  -   </s2>
  +  <s1 title="Caching">
  +    <p>Although the basic caching mechanism is still the same (each sitemap component
  +       in the pipeline is queried), the interfaces for a component have been
  +       improved as well.</p>
  +    <p>The following deprecated interfaces and classes have been removed from
  +     the <em>org.apache.cocoon.caching</em> package:</p>
  +     <ul>
  +     <li><em>Cacheable</em> : Use the <em>CacheableProcessingComponent</em> interface that is very similar.</li>
  +     <li><em>CacheValidity</em> : Is replaced by <em>SourceValidity</em>.</li>
  +     <li><em>AggregatedCacheValidity</em></li>
  +     <li><em>CompositeCacheValidity</em></li> 
  +     <li><em>DeltaTimeCacheValidity</em></li>
  +     <li><em>IncludeCacheValidity</em></li>
  +     <li><em>NOPCacheValidity</em></li>
  +     <li><em>ParametersCacheValidity</em></li>
  +     <li><em>TimeStampCacheValidity</em></li>
  +     <li><em>CacheValidityToSourceValidity</em></li>
  +     <li><em>SourceCacheValidity</em></li>
  +     <li><em>CachedEventObject</em> : Is replaced by <em>CachedResponse</em>.</li>
  +     <li><em>CachedStreamObject</em> : Is replaced by <em>CachedResponse</em>.</li>
  +     </ul>
  +    <p>Some other interfaces and implementations, like the validity of the cached 
  +      information have moved to the source packacke in Avalon Excalibur.</p>
     </s1>
  +
  +<!--
     <s1 title="Components">
      <p>
       The Cocoon architecture has changed significantly. However, great care has been
  @@ -212,22 +151,6 @@
       <p>The default entities (DTDs, entity sets, etc.) have moved to the
        WEB-INF/ directory.
       </p>
  -   </s2>
  -   <s2 title="Caching">
  -    <p>Although the basic caching mechanism is still the same (each sitemap component
  -       in the pipeline is queried), the interface for a component have been
  -       improved as well.</p>
  -    <p>The old interface <em>Cacheable</em> is deprecated in favour of the new
  -      <em>CacheableProcessingComponent</em> interface. The basic behaviour of this
  -      interface has been preserved, however the method names and the signatures
  -      have changed a little bit.
  -      </p>
  -    <p>Some other interfaces, like the validity of the cached information has
  -      moved to the source packacke in Avalon Excalibur.</p>
  -    <p>The old interfaces are still support but deprecated, so it's advisable to
  -      update your components. However, you can support both interfaces at the
  -      same time, making your component runable in old and new Cocoon installations
  -      at the same time.</p>
      </s2>
      <s2 title="Stores">
       <p>The Store and StoreJanitor components and implementations have been moved to
  
  
  
  1.12      +16 -14    cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SQLTransformer.java	6 Oct 2003 16:29:59 -0000	1.11
  +++ SQLTransformer.java	21 Oct 2003 12:39:17 -0000	1.12
  @@ -52,12 +52,14 @@
   
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.*;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.ServiceSelector;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.sax.XMLDeserializer;
   import org.apache.cocoon.components.sax.XMLSerializer;
  @@ -92,7 +94,7 @@
    */
   public class SQLTransformer
     extends AbstractSAXTransformer
  -  implements Composable, Disposable, Configurable {
  +  implements Disposable, Configurable {
   
       /** The SQL namespace **/
       public static final String NAMESPACE = "http://apache.org/cocoon/SQL/2.0";
  @@ -178,7 +180,7 @@
       protected String outUri;
   
       /** The database selector */
  -    protected ComponentSelector dbSelector;
  +    protected ServiceSelector dbSelector;
   
       /** The format for serializing xml */
       protected Properties format;
  @@ -207,14 +209,14 @@
       protected Connection conn;
   
       /**
  -     * Composable
  +     * Serviceable
        */
  -    public void compose( ComponentManager manager ) throws ComponentException {
  -        super.compose(manager);
  +    public void service( ServiceManager manager ) throws ServiceException {
  +        super.service(manager);
           this.queries = new Vector();
           try {
  -            this.dbSelector = (ComponentSelector) manager.lookup( DataSourceComponent.ROLE + "Selector" );
  -        } catch ( ComponentException cme ) {
  +            this.dbSelector = (ServiceSelector) manager.lookup( DataSourceComponent.ROLE + "Selector" );
  +        } catch ( ServiceException cme ) {
               getLogger().warn( "Could not get the DataSource Selector", cme );
           }
       }
  @@ -236,7 +238,7 @@
           this.queries.clear();
           this.outUri = null;
           this.outPrefix = null;
  -        this.manager.release((Component)this.parser);
  +        this.manager.release(this.parser);
           this.parser = null;
           this.manager.release(this.compiler);
           this.compiler = null;
  @@ -1026,7 +1028,7 @@
                                       }
                                   }
                               }
  -                        } catch ( ComponentException cme ) {
  +                        } catch ( ServiceException cme ) {
                                transformer.getTheLogger().error( "Could not use connection: " + connection, cme );
                           } finally {
                               if ( datasource != null ) this.transformer.dbSelector.release( datasource );
  @@ -1230,7 +1232,7 @@
               query_parts.addElement( object );
           }
   
  -        protected void serializeData(ComponentManager manager, String value)
  +        protected void serializeData(ServiceManager manager, String value)
                   throws SQLException, SAXException {
               if (value != null) {
                   value = value.trim();
  @@ -1272,7 +1274,7 @@
               }
           }
   
  -        protected void serializeRow(ComponentManager manager)
  +        protected void serializeRow(ServiceManager manager)
           throws SQLException, SAXException {
               AttributesImpl attr = new AttributesImpl();
               if ( !isupdate && !isstoredprocedure ) {
  @@ -1289,7 +1291,7 @@
               }
           }
   
  -        protected void serializeStoredProcedure(ComponentManager manager)
  +        protected void serializeStoredProcedure(ServiceManager manager)
           throws SQLException, SAXException {
               if ( outParametersNames == null || cst == null )
                   return;
  
  
  
  1.3       +8 -9      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation/AbstractSessionTransformer.java
  
  Index: AbstractSessionTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation/AbstractSessionTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractSessionTransformer.java	4 May 2003 20:19:39 -0000	1.2
  +++ AbstractSessionTransformer.java	21 Oct 2003 12:39:17 -0000	1.3
  @@ -50,8 +50,7 @@
   */
   package org.apache.cocoon.webapps.session.transformation;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.Session;
   import org.apache.cocoon.transformation.AbstractSAXTransformer;
  @@ -80,7 +79,7 @@
           if (this.sessionManager == null) {
               try {
                   this.sessionManager = (SessionManager)this.manager.lookup(SessionManager.ROLE);
  -            } catch (ComponentException ce) {
  +            } catch (ServiceException ce) {
                   throw new ProcessingException("Error during lookup of SessionManager component.", ce);
               }
           }
  @@ -95,7 +94,7 @@
           if (this.contextManager == null) {
               try {
                   this.contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);
  -            } catch (ComponentException ce) {
  +            } catch (ServiceException ce) {
                   throw new ProcessingException("Error during lookup of ContextManager component.", ce);
               }
           }
  @@ -110,7 +109,7 @@
           if (this.formManager == null) {
               try {
                   this.formManager = (FormManager)this.manager.lookup(FormManager.ROLE);
  -            } catch (ComponentException ce) {
  +            } catch (ServiceException ce) {
                   throw new ProcessingException("Error during lookup of FormManager component.", ce);
               }
           }
  @@ -122,9 +121,9 @@
        */
       public void recycle() {
           super.recycle();
  -        this.manager.release( (Component)this.sessionManager);
  -        this.manager.release( (Component)this.formManager);
  -        this.manager.release( (Component)this.contextManager);
  +        this.manager.release( this.sessionManager);
  +        this.manager.release( this.formManager);
  +        this.manager.release( this.contextManager);
           this.sessionManager = null;
           this.formManager = null;
           this.contextManager = null;
  
  
  
  1.5       +10 -10    cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java
  
  Index: SessionContextImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SessionContextImpl.java	18 Jun 2003 12:36:46 -0000	1.4
  +++ SessionContextImpl.java	21 Oct 2003 12:39:17 -0000	1.5
  @@ -50,7 +50,7 @@
   */
   package org.apache.cocoon.webapps.portal.context;
   
  -import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
  @@ -515,10 +515,10 @@
        * an exception is thrown.
        */
       public void loadXML(String path,
  -                        SourceParameters   parameters,
  -                        Map                objectModel,
  -                        SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        SourceParameters parameters,
  +                        Map              objectModel,
  +                        SourceResolver   resolver,
  +                        ServiceManager   manager)
       throws SAXException, ProcessingException, IOException {
           throw new ProcessingException("The context " + this.name + " does not support loading.");
       }
  @@ -529,10 +529,10 @@
        * an exception is thrown.
        */
       public void saveXML(String path,
  -                        SourceParameters   parameters,
  -                        Map                objectModel,
  -                        SourceResolver     resolver,
  -                        ComponentManager   manager)
  +                        SourceParameters parameters,
  +                        Map              objectModel,
  +                        SourceResolver   resolver,
  +                        ServiceManager   manager)
       throws SAXException, ProcessingException, IOException {
           throw new ProcessingException("The context " + this.name + " does not support saving.");
       }
  
  
  
  1.2       +15 -14    cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/selection/MediaSelector.java
  
  Index: MediaSelector.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/selection/MediaSelector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MediaSelector.java	4 May 2003 20:19:42 -0000	1.1
  +++ MediaSelector.java	21 Oct 2003 12:39:17 -0000	1.2
  @@ -52,10 +52,10 @@
   
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.selection.Selector;
   import org.apache.cocoon.webapps.session.MediaManager;
  @@ -67,16 +67,9 @@
    * @version CVS $Id$
   */
   public final class MediaSelector
  -implements Composable, Selector, ThreadSafe {
  +implements Serviceable, Selector, ThreadSafe {
   
  -    private ComponentManager manager;
  -
  -    /**
  -     * Composable
  -     */
  -    public void compose(ComponentManager manager) {
  -        this.manager = manager;
  -    }
  +    private ServiceManager manager;
   
       /**
        * Selector
  @@ -91,10 +84,18 @@
               // ignore me
               result = false;
           } finally {
  -            this.manager.release( (Component)mediaManager );
  +            this.manager.release(mediaManager );
           }
           return result;
       }
  +    
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
  +     */
  +    public void service(ServiceManager manager) throws ServiceException {
  +        this.manager = manager;
  +    }
  +
   }
   
   
  
  
  

Mime
View raw message