cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/source/impl BlobSourceFactory.java BlobSource.java
Date Sat, 25 Oct 2003 18:06:20 GMT
joerg       2003/10/25 11:06:20

  Modified:    src/java/org/apache/cocoon/acting
                        AbstractComplementaryConfigurableAction.java
                        InputModuleAction.java
               src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl
                        CachingSource.java RefresherImpl.java
                        AsyncCachingSource.java CachingSourceFactory.java
               src/blocks/qdox/java/org/apache/cocoon/components/source/impl
                        QDoxSourceFactory.java QDoxSource.java
               src/blocks/databases/java/org/apache/cocoon/acting/modular
                        DatabaseDeleteAction.java DatabaseQueryAction.java
                        DatabaseSelectAction.java DatabaseAddAction.java
                        DatabaseUpdateAction.java DatabaseAction.java
               src/blocks/slide/java/org/apache/cocoon/components/source/impl
                        SlideSourceFactory.java SlideSource.java
               src/java/org/apache/cocoon/components/source/impl
                        ContextSourceFactory.java
               src/blocks/xmldb/java/org/apache/cocoon/components/source/impl
                        XMLDBSource.java XMLDBSourceFactory.java
               src/blocks/databases/java/org/apache/cocoon/acting
                        AbstractDatabaseAction.java
               src/blocks/databases/java/org/apache/cocoon/components/source/impl
                        BlobSourceFactory.java BlobSource.java
  Log:
  Composable => Serviceable
  
  Revision  Changes    Path
  1.3       +2 -2      cocoon-2.1/src/java/org/apache/cocoon/acting/AbstractComplementaryConfigurableAction.java
  
  Index: AbstractComplementaryConfigurableAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/acting/AbstractComplementaryConfigurableAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractComplementaryConfigurableAction.java	16 May 2003 07:04:56 -0000	1.2
  +++ AbstractComplementaryConfigurableAction.java	25 Oct 2003 18:06:19 -0000	1.3
  @@ -71,7 +71,7 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @version CVS $Id$
    */
  -public abstract class AbstractComplementaryConfigurableAction extends ConfigurableComposerAction {
  +public abstract class AbstractComplementaryConfigurableAction extends ConfigurableServiceableAction {
       private static Map configurations = new HashMap();
   
       /**
  
  
  
  1.3       +4 -8      cocoon-2.1/src/java/org/apache/cocoon/acting/InputModuleAction.java
  
  Index: InputModuleAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/acting/InputModuleAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InputModuleAction.java	15 Aug 2003 15:54:15 -0000	1.2
  +++ InputModuleAction.java	25 Oct 2003 18:06:19 -0000	1.3
  @@ -100,17 +100,13 @@
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class InputModuleAction extends ConfigurableComposerAction {
  +public class InputModuleAction extends ConfigurableServiceableAction {
   
       /* (non-Javadoc)
        * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
        */
  -    public Map act(
  -        Redirector redirector,
  -        SourceResolver resolver,
  -        Map objectModel,
  -        String source,
  -        Parameters parameters)
  +    public Map act(Redirector redirector, SourceResolver resolver,
  +                   Map objectModel, String source, Parameters parameters)
           throws Exception {
   
           HashMap map = null;
  
  
  
  1.2       +16 -17    cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/CachingSource.java
  
  Index: CachingSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/CachingSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CachingSource.java	4 Sep 2003 12:42:34 -0000	1.1
  +++ CachingSource.java	25 Oct 2003 18:06:19 -0000	1.2
  @@ -60,11 +60,10 @@
   
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  -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.cocoon.CascadingIOException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.Cache;
  @@ -95,10 +94,10 @@
    */
   public class CachingSource
   extends AbstractLogEnabled
  -implements Source, Composable, Initializable, Disposable, XMLizable {
  +implements Source, Serviceable, Initializable, Disposable, XMLizable {
   
  -    /** The current ComponentManager */
  -    protected ComponentManager manager;
  +    /** The current ServiceManager */
  +    protected ServiceManager manager;
   
       /** The current source resolver */
       protected SourceResolver resolver;
  @@ -309,9 +308,9 @@
   
   
       /* (non-Javadoc)
  -     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  +     * @see org.apache.avalon.framework.component.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;
       }
   
  @@ -386,7 +385,7 @@
               SAXParser parser = null;
               try {
                   serializer = (XMLSerializer)this.manager.lookup(XMLSerializer.ROLE);
  -                if ( this.source instanceof XMLizable ) {
  +                if (this.source instanceof XMLizable) {
                       ((XMLizable)this.source).toSAX(serializer);
                   } else {
                       parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
  @@ -394,14 +393,14 @@
                       final InputSource inputSource = new InputSource(new ByteArrayInputStream(this.cachedResponse.getResponse()));
                       inputSource.setSystemId(this.source.getURI());
                       
  -                    parser.parse( inputSource, serializer );
  +                    parser.parse(inputSource, serializer);
                   }
                   
                   this.cachedResponse.setAlternativeResponse((byte[])serializer.getSAXFragment());
  -            } catch (ComponentException ce) {
  -                throw new CascadingIOException("Unable to lookup xml serializer.", ce);
  +            } catch (ServiceException se) {
  +                throw new CascadingIOException("Unable to lookup xml serializer.", se);
               } finally {
  -                this.manager.release((Component)parser);
  +                this.manager.release(parser);
                   this.manager.release(serializer);
               }
               storeResponse = true;
  @@ -439,8 +438,8 @@
                  deserializer.setConsumer(new ContentHandlerWrapper(contentHandler));
              }
              deserializer.deserialize( this.cachedResponse.getAlternativeResponse() );
  -       } catch (ComponentException ce ) {
  -           throw new SAXException("Unable to lookup xml deserializer.", ce);
  +       } catch (ServiceException se ) {
  +           throw new SAXException("Unable to lookup xml deserializer.", se);
          } finally {
              this.manager.release(deserializer);
          }
  
  
  
  1.3       +16 -17    cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/RefresherImpl.java
  
  Index: RefresherImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/RefresherImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RefresherImpl.java	24 Sep 2003 22:34:52 -0000	1.2
  +++ RefresherImpl.java	25 Oct 2003 18:06:19 -0000	1.3
  @@ -63,16 +63,15 @@
   
   import org.apache.avalon.framework.CascadingException;
   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.configuration.Configuration;
   import org.apache.avalon.framework.configuration.SAXConfigurationHandler;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameterizable;
   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.caching.SimpleCacheKey;
   import org.apache.cocoon.components.cron.ConfigurableCronJob;
  @@ -95,11 +94,11 @@
    */
   public class RefresherImpl 
       extends AbstractLogEnabled
  -    implements Parameterizable, ThreadSafe, Refresher, Composable, Disposable, CronJob {
  +    implements Parameterizable, ThreadSafe, Refresher, Serviceable, Disposable, CronJob {
       
       protected String schedulerTarget;
       
  -    protected ComponentManager manager;
  +    protected ServiceManager manager;
       
       protected JobScheduler   scheduler;
       
  @@ -140,7 +139,7 @@
                       for(int i=0; i < childs.length; i++) {
                           try {
                               String uri = URLDecoder.decode(childs[i].getAttribute("uri"));
  -                            int   expires = childs[i].getAttributeAsInteger("expires");
  +                            int expires = childs[i].getAttributeAsInteger("expires");
                               String cache = childs[i].getAttribute("cache");                        
                               String key = URLDecoder.decode(childs[i].getAttribute("key"));
                               SimpleCacheKey cacheKey = new SimpleCacheKey(key, false);
  @@ -189,17 +188,17 @@
               t = (ConfigurableCronJob)this.manager.lookup(this.schedulerTarget);
               t.setup(conf.parameters, conf.map);
               t.execute(name);
  -        } catch (ComponentException ce) {
  -            throw new SourceException("Unable to lookup target " + this.schedulerTarget, ce);
  +        } catch (ServiceException se) {
  +            throw new SourceException("Unable to lookup target " + this.schedulerTarget, se);
           } finally {
  -            this.manager.release((Component)t);
  +            this.manager.release(t);
           }
       }
   
       /* (non-Javadoc)
        * @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;
           this.scheduler = (JobScheduler)this.manager.lookup(JobScheduler.ROLE);
           this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
  @@ -209,14 +208,14 @@
        * @see org.apache.avalon.framework.activity.Disposable#dispose()
        */
       public void dispose() {
  -        if ( this.manager != null ) {
  -            this.manager.release( (Component)this.scheduler );
  +        if (this.manager != null) {
  +            this.manager.release(this.scheduler);
               this.scheduler = null;
               this.manager = null;
  -            if ( this.resolver != null ) {
  -                this.resolver.release( this.writeSource );
  +            if (this.resolver != null) {
  +                this.resolver.release(this.writeSource);
                   this.writeSource = null;
  -                this.manager.release( this.resolver );
  +                this.manager.release(this.resolver);
                   this.resolver = null;
               }
           }
  
  
  
  1.2       +6 -6      cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/AsyncCachingSource.java
  
  Index: AsyncCachingSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/AsyncCachingSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AsyncCachingSource.java	4 Sep 2003 12:42:34 -0000	1.1
  +++ AsyncCachingSource.java	25 Oct 2003 18:06:19 -0000	1.2
  @@ -59,8 +59,8 @@
   
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.CachedResponse;
   import org.apache.cocoon.caching.ExtendedCachedResponse;
  @@ -85,7 +85,7 @@
    */
   public class AsyncCachingSource
   extends CachingSource
  -implements Source, Composable, Initializable, Disposable, XMLizable {
  +implements Source, Serviceable, Initializable, Disposable, XMLizable {
   
       protected SourceValidity validity;
       
  @@ -179,8 +179,8 @@
                  deserializer.setConsumer(new ContentHandlerWrapper(contentHandler));
              }
              deserializer.deserialize( this.cachedResponse.getAlternativeResponse() );
  -       } catch (ComponentException ce ) {
  -           throw new SAXException("Unable to lookup xml deserializer.", ce);
  +       } catch (ServiceException se ) {
  +           throw new SAXException("Unable to lookup xml deserializer.", se);
          } finally {
              this.manager.release(deserializer);
          }
  
  
  
  1.2       +22 -24    cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/CachingSourceFactory.java
  
  Index: CachingSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/CachingSourceFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CachingSourceFactory.java	4 Sep 2003 12:42:34 -0000	1.1
  +++ CachingSourceFactory.java	25 Oct 2003 18:06:19 -0000	1.2
  @@ -55,15 +55,14 @@
   import java.util.Map;
   
   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.container.ContainerUtil;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameterizable;
   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.caching.Cache;
   import org.apache.cocoon.caching.CachedResponse;
  @@ -88,10 +87,10 @@
    */
   public final class CachingSourceFactory
       extends AbstractLogEnabled
  -    implements SourceFactory, ThreadSafe, Composable, URIAbsolutizer, Disposable, Parameterizable
  +    implements SourceFactory, ThreadSafe, Serviceable, URIAbsolutizer, Disposable, Parameterizable
   {
  -    /** The <code>ComponentManager</code> */
  -    protected ComponentManager manager;
  +    /** The <code>ServiceManager</code> */
  +    protected ServiceManager manager;
   
       /** The {@link SourceResolver} */
       protected SourceResolver   resolver;
  @@ -109,10 +108,9 @@
       protected Refresher refresher;
       
       /**
  -     * Composable
  +     * Serviceable
        */
  -    public void compose(ComponentManager manager) 
  -    throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
           // due to cyclic dependencies we can't lookup the resolver or the refresher here
       }
  @@ -131,15 +129,15 @@
           if (this.resolver == null) {
               try {
                   this.resolver = (SourceResolver)this.manager.lookup( SourceResolver.ROLE );
  -            } catch (ComponentException ce) {
  -                throw new SourceException("SourceResolver is not available.", ce);
  +            } catch (ServiceException se) {
  +                throw new SourceException("SourceResolver is not available.", se);
               }
           }
           if ( this.refresher == null ) {
               try {
                   this.refresher = (Refresher)this.manager.lookup(Refresher.ROLE);
  -            } catch (ComponentException ce) {
  -                throw new SourceException("Refesher is not available.", ce);
  +            } catch (ServiceException se) {
  +                throw new SourceException("Refesher is not available.", se);
               }
           }
   
  @@ -170,14 +168,14 @@
           }
           ContainerUtil.enableLogging(source, this.getLogger());
           try {
  -            ContainerUtil.compose(source, this.manager);
  +            ContainerUtil.service(source, this.manager);
               // we pass the components for performance reasons
               source.init(this.resolver, this.cache);
               ContainerUtil.initialize(source);                                  
           } catch (IOException ioe) {
               throw ioe;
  -        } catch (ComponentException ce) {
  -            throw new SourceException("Unable to initialize source.", ce);
  +        } catch (ServiceException se) {
  +            throw new SourceException("Unable to initialize source.", se);
           } catch (Exception e) {
               throw new SourceException("Unable to initialize source.", e);
           }
  @@ -204,10 +202,10 @@
        * @see org.apache.avalon.framework.activity.Disposable#dispose()
        */
       public void dispose() {
  -        if ( this.manager != null ) {
  -            this.manager.release( this.resolver );
  -            this.manager.release( this.cache );
  -            this.manager.release( (Component)this.refresher );
  +        if (this.manager != null) {
  +            this.manager.release(this.resolver);
  +            this.manager.release(this.cache);
  +            this.manager.release(this.refresher);
               this.refresher = null;
               this.cache = null;
               this.manager = null;
  @@ -226,8 +224,8 @@
           
           try {
               this.cache = (Cache)this.manager.lookup(this.cacheRole);
  -        } catch (ComponentException ce) {
  -            throw new ParameterException("Unable to lookup cache: " + this.cacheRole, ce);
  +        } catch (ServiceException se) {
  +            throw new ParameterException("Unable to lookup cache: " + this.cacheRole, se);
           }
   
           this.async = parameters.getParameterAsBoolean("async", false);
  
  
  
  1.2       +11 -11    cocoon-2.1/src/blocks/qdox/java/org/apache/cocoon/components/source/impl/QDoxSourceFactory.java
  
  Index: QDoxSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/qdox/java/org/apache/cocoon/components/source/impl/QDoxSourceFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- QDoxSourceFactory.java	6 May 2003 08:49:59 -0000	1.1
  +++ QDoxSourceFactory.java	25 Oct 2003 18:06:19 -0000	1.2
  @@ -59,13 +59,13 @@
   import java.util.List;
   import java.util.Map;
   
  -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.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.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  @@ -113,7 +113,7 @@
    */
   public final class QDoxSourceFactory
       extends AbstractLogEnabled
  -    implements SourceFactory, Composable, Configurable, ThreadSafe {
  +    implements SourceFactory, Serviceable, Configurable, ThreadSafe {
       
       protected final static String INCLUDE_INHERITANCE_ELEMENT = "include-inheritance";
       protected final static String VALUE_ATTRIBUTE = "value";
  @@ -122,7 +122,7 @@
       protected final static String SOURCE_ROOT_ELEMENT = "source-root";
       protected final static String URI_ATTRIBUTE = "uri";
       
  -    protected ComponentManager manager;
  +    protected ServiceManager manager;
       protected List sourceRootUris;
       
       /**
  @@ -180,8 +180,8 @@
                       getLogger().debug("getSource called with className=" + className);
                   }
                   javaSource = getSource(className);
  -            } catch (ComponentException ce) {
  -                throw new SourceException("SourceResolver not found", ce);
  +            } catch (ServiceException se) {
  +                throw new SourceException("SourceResolver not found", se);
               }
           } else {
               throw new MalformedURLException();
  @@ -200,9 +200,9 @@
       }
       
       /**
  -     * @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 {
           if (getLogger().isDebugEnabled()) {
               getLogger().debug("Composing the QDoxSourceFactory...");
           }
  @@ -252,7 +252,7 @@
        * @param className
        * @return File
        */
  -    private Source getSource(String className) throws ComponentException {
  +    private Source getSource(String className) throws ServiceException {
           String classFileName = className;
           String packageName;
           
  
  
  
  1.4       +9 -12     cocoon-2.1/src/blocks/qdox/java/org/apache/cocoon/components/source/impl/QDoxSource.java
  
  Index: QDoxSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/qdox/java/org/apache/cocoon/components/source/impl/QDoxSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QDoxSource.java	5 Jul 2003 14:30:52 -0000	1.3
  +++ QDoxSource.java	25 Oct 2003 18:06:19 -0000	1.4
  @@ -73,13 +73,10 @@
   import com.thoughtworks.qdox.model.JavaSource;
   import com.thoughtworks.qdox.model.Type;
   
  -//import org.apache.avalon.framework.component.ComponentException;
   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.ComponentSelector;
   import org.apache.avalon.framework.logger.Logger;
  -//import org.apache.cocoon.serialization.Serializer;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.serialization.XMLSerializer;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  @@ -157,7 +154,7 @@
       protected final static int CONSTRUCTOR_INHERITANCE = 5;
       protected final static int METHOD_INHERITANCE = 6;
   
  -    protected ComponentManager manager;
  +    protected ServiceManager manager;
       protected Logger logger;
   
       protected Source javaSource;
  @@ -200,7 +197,7 @@
        * @param logger
        * @param manager
        */
  -    public QDoxSource(String location, Source javaSource, Logger logger, ComponentManager manager) {
  +    public QDoxSource(String location, Source javaSource, Logger logger, ServiceManager manager) {
           this.javadocUri = location;
           this.javaSource = javaSource;
           this.logger = logger;
  @@ -529,8 +526,8 @@
   
                           resolver.release(source);
                       }
  -                } catch (ComponentException e) {
  -                    logger.error("Could not find a SourceResolver!", e);
  +                } catch (ServiceException se) {
  +                    logger.error("Could not find a SourceResolver!", se);
                   } catch (MalformedURLException e) {
                       // ignore - invalid URI (is subject of test)
                   } catch (SourceException e) {
  @@ -765,8 +762,8 @@
                   classMap.put(className, jClass);
               }
               resolver.release(source);
  -        } catch (ComponentException ce) {
  -            logger.error("Couldn't return JavaClass!", ce);
  +        } catch (ServiceException se) {
  +            logger.error("Couldn't return JavaClass!", se);
           } catch (MalformedURLException mue) {
               logger.error("Couldn't return JavaClass!", mue);
           } catch (SourceException se) {
  
  
  
  1.2       +4 -4      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseDeleteAction.java
  
  Index: DatabaseDeleteAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseDeleteAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DatabaseDeleteAction.java	9 Mar 2003 00:03:04 -0000	1.1
  +++ DatabaseDeleteAction.java	25 Oct 2003 18:06:19 -0000	1.2
  @@ -56,9 +56,9 @@
   import java.sql.SQLException;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.service.ServiceException;
   
   /**
    * Updates a record in a database. The action can update one or more
  @@ -92,7 +92,7 @@
        * database operation.
        */
       protected Object[][] getColumnValues( Configuration tableConf, CacheHelper queryData, Map objectModel )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           Object[][] columnValues = new Object[ queryData.columns.length ][];
           for ( int i = 0; i < queryData.columns.length; i++ ){
  @@ -116,7 +116,7 @@
        * @return the insert query as a string
        */
       protected CacheHelper getQuery( Configuration table, Map modeTypes, Map defaultModeNames )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           LookUpKey lookUpKey = new LookUpKey( table, modeTypes );
           CacheHelper queryData = null;
  
  
  
  1.3       +4 -4      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java
  
  Index: DatabaseQueryAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DatabaseQueryAction.java	24 Sep 2003 21:54:48 -0000	1.2
  +++ DatabaseQueryAction.java	25 Oct 2003 18:06:19 -0000	1.3
  @@ -58,9 +58,9 @@
   import java.sql.SQLException;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.service.ServiceException;
   
   /**
    * Executes an arbitrary query. The query is associated with a table
  @@ -114,7 +114,7 @@
        * @return the insert query as a string
        */
       protected CacheHelper getQuery( Configuration table, Map modeTypes, Map defaultModeNames )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           LookUpKey lookUpKey = new LookUpKey( table, modeTypes );
           CacheHelper queryData = null;
  @@ -164,7 +164,7 @@
        * Fetch all values for all columns that are needed to do the database operation.
        */
       protected Object[][] getColumnValues( Configuration tableConf, CacheHelper queryData, Map objectModel )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           Object[][] columnValues = new Object[ queryData.columns.length ][];
           for ( int i = 0; i < queryData.columns.length; i++ ){
  
  
  
  1.2       +4 -4      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseSelectAction.java
  
  Index: DatabaseSelectAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseSelectAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DatabaseSelectAction.java	9 Mar 2003 00:03:04 -0000	1.1
  +++ DatabaseSelectAction.java	25 Oct 2003 18:06:19 -0000	1.2
  @@ -57,9 +57,9 @@
   import java.sql.SQLException;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.service.ServiceException;
   
   import org.apache.cocoon.util.JDBCTypeConversions;
   
  @@ -100,7 +100,7 @@
        * @return the insert query as a string
        */
       protected CacheHelper getQuery( Configuration table, Map modeTypes, Map defaultModeNames )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           LookUpKey lookUpKey = new LookUpKey( table, modeTypes );
           CacheHelper queryData = null;
  @@ -158,7 +158,7 @@
        * database operation.
        */
       protected Object[][] getColumnValues( Configuration tableConf, CacheHelper queryData, Map objectModel )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           Object[][] columnValues = new Object[ queryData.columns.length ][];
           for ( int i = 0; i < queryData.columns.length; i++ ){
  
  
  
  1.3       +9 -7      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseAddAction.java
  
  Index: DatabaseAddAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseAddAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DatabaseAddAction.java	1 Jul 2003 11:23:19 -0000	1.2
  +++ DatabaseAddAction.java	25 Oct 2003 18:06:19 -0000	1.3
  @@ -61,6 +61,8 @@
   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.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceSelector;
   
   import org.apache.cocoon.components.modules.database.AutoIncrementModule;
   
  @@ -166,7 +168,7 @@
        */
       protected void storeKeyValue( Configuration tableConf, Column key, int rowIndex, Connection conn,
                                     Statement statement, Map objectModel, String outputMode, Map results )
  -        throws SQLException, ConfigurationException, ComponentException {
  +        throws SQLException, ConfigurationException, ComponentException, ServiceException {
   
           ComponentSelector autoincrSelector = null;
           AutoIncrementModule autoincr = null;
  @@ -219,7 +221,7 @@
        */
       protected Object[][] getColumnValues( Configuration tableConf, CacheHelper queryData,
                                             Map objectModel )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           Object[][] columnValues = new Object[ queryData.columns.length ][];
           for ( int i = 0; i < queryData.columns.length; i++ ){
  @@ -237,7 +239,7 @@
        * @return the insert query as a string
        */
       protected CacheHelper getQuery( Configuration table, Map modeTypes, Map defaultModeNames )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           LookUpKey lookUpKey = new LookUpKey( table, modeTypes );
           CacheHelper queryData = null;
  @@ -266,13 +268,13 @@
                       }
                       if ( queryData.columns[i].isKey && queryData.columns[i].isAutoIncrement ) {
   
  -                        ComponentSelector autoincrSelector = null;
  +                        ServiceSelector autoincrSelector = null;
                           AutoIncrementModule autoincr = null;
                           try {
  -                            autoincrSelector=(ComponentSelector) this.manager.lookup(DATABASE_MODULE_SELECTOR); 
  +                            autoincrSelector = (ServiceSelector) this.manager.lookup(DATABASE_MODULE_SELECTOR); 
                               if (queryData.columns[i].mode != null && 
                                   autoincrSelector != null && 
  -                                autoincrSelector.hasComponent(queryData.columns[i].mode)){
  +                                autoincrSelector.isSelectable(queryData.columns[i].mode)){
                                   autoincr = (AutoIncrementModule) autoincrSelector.select(queryData.columns[i].mode);
                                   
                                   if ( autoincr.includeInQuery() ) {
  
  
  
  1.3       +4 -4      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseUpdateAction.java
  
  Index: DatabaseUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseUpdateAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DatabaseUpdateAction.java	1 Jul 2003 11:23:19 -0000	1.2
  +++ DatabaseUpdateAction.java	25 Oct 2003 18:06:19 -0000	1.3
  @@ -56,9 +56,9 @@
   import java.sql.SQLException;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.service.ServiceException;
   
   /**
    * Updates a record in a database. The action can update one or more
  @@ -92,7 +92,7 @@
        * database operation.
        */
       protected Object[][] getColumnValues( Configuration tableConf, CacheHelper queryData, Map objectModel )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           Object[][] columnValues = new Object[ queryData.columns.length ][];
           for ( int i = 0; i < queryData.columns.length; i++ ){
  @@ -111,7 +111,7 @@
        * @return the insert query as a string
        */
       protected CacheHelper getQuery( Configuration table, Map modeTypes, Map defaultModeNames )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           LookUpKey lookUpKey = new LookUpKey( table, modeTypes );
           CacheHelper queryData = null;
  
  
  
  1.5       +26 -26    cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseAction.java
  
  Index: DatabaseAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseAction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DatabaseAction.java	24 Sep 2003 21:54:48 -0000	1.4
  +++ DatabaseAction.java	25 Oct 2003 18:06:19 -0000	1.5
  @@ -59,13 +59,13 @@
   
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.activity.Disposable;
  -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.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.ServiceSelector;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.acting.AbstractComplementaryConfigurableAction;
  @@ -151,7 +151,7 @@
       // instance vars
       // ========================================================================
   
  -    protected ComponentSelector dbselector;
  +    protected ServiceSelector dbselector;
       protected Map defaultModeNames = new HashMap( 3 );
       protected final HashMap cachedQueryData = new HashMap();
       protected String pathSeparator = ".";
  @@ -259,9 +259,9 @@
       /**
        * Compose the Actions so that we can select our databases.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        this.dbselector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE + "Selector");
  -        super.compose(manager);
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
  +        this.dbselector = (ServiceSelector) manager.lookup(DataSourceComponent.ROLE + "Selector");
       }
   
   
  @@ -281,7 +281,7 @@
        * Get the Datasource we need.
        */
       protected DataSourceComponent getDataSource( Configuration conf, Parameters parameters )
  -        throws ComponentException {
  +        throws ServiceException {
   
           String sourceName = parameters.getParameter( "connection", (String) settings.get( "connection" ) );
           if ( sourceName == null ) {
  @@ -311,11 +311,11 @@
        */
       protected void setOutputAttribute(Map objectModel, String outputMode, String key, Object value) {
   
  -        ComponentSelector outputSelector = null;
  +        ServiceSelector outputSelector = null;
           OutputModule output = null;
           try {
  -            outputSelector=(ComponentSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
  -            if (outputMode != null && outputSelector != null && outputSelector.hasComponent(outputMode)){
  +            outputSelector = (ServiceSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
  +            if (outputMode != null && outputSelector != null && outputSelector.isSelectable(outputMode)){
                   output = (OutputModule) outputSelector.select(outputMode);
               }
               output.setAttribute( null, objectModel, key, value );
  @@ -484,7 +484,7 @@
        *
        */
       protected Object[] getColumnValue( Configuration tableConf, Column column, Map objectModel )
  -        throws ConfigurationException, ComponentException {
  +        throws ConfigurationException, ServiceException {
   
           if ( column.isAutoIncrement ) {
               return new Object[1];
  @@ -493,15 +493,15 @@
               String cname = getOutputName( tableConf, column.columnConf );
   
               // obtain input module and read values
  -            ComponentSelector inputSelector = null;
  +            ServiceSelector inputSelector = null;
               InputModule input = null;
               try {
  -                inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
  -                if (column.mode != null && inputSelector != null && inputSelector.hasComponent(column.mode)){
  +                inputSelector = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
  +                if (column.mode != null && inputSelector != null && inputSelector.isSelectable(column.mode)){
                       input = (InputModule) inputSelector.select(column.mode);
                   }
   
  -                if ( column.isSet ){
  +                if (column.isSet) {
                       if (getLogger().isDebugEnabled())
                           getLogger().debug( "Trying to set column " + cname +" from "+column.mode+" using getAttributeValues method");
                       values = input.getAttributeValues( cname, column.modeConf, objectModel );
  @@ -735,14 +735,14 @@
                   conn.commit();
   
               // obtain output mode module and rollback output
  -            ComponentSelector outputSelector = null;
  +            ServiceSelector outputSelector = null;
               OutputModule output = null;
               try {
  -                outputSelector=(ComponentSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
  -                if (outputMode != null && outputSelector != null && outputSelector.hasComponent(outputMode)){
  +                outputSelector = (ServiceSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
  +                if (outputMode != null && outputSelector != null && outputSelector.isSelectable(outputMode)){
                       output = (OutputModule) outputSelector.select(outputMode);
                   }
  -                output.commit( null, objectModel );
  +                output.commit(null, objectModel);
               } catch (Exception e) {
                   if (getLogger().isWarnEnabled()) {
                       getLogger().warn("Could not select output mode "
  @@ -768,11 +768,11 @@
                       results = null;
   
                       // obtain output mode module and commit output
  -                    ComponentSelector outputSelector = null;
  +                    ServiceSelector outputSelector = null;
                       OutputModule output = null;
                       try {
  -                        outputSelector=(ComponentSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
  -                        if (outputMode != null && outputSelector != null && outputSelector.hasComponent(outputMode)){
  +                        outputSelector = (ServiceSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
  +                        if (outputMode != null && outputSelector != null && outputSelector.isSelectable(outputMode)){
                               output = (OutputModule) outputSelector.select(outputMode);
                           }
                           output.rollback( null, objectModel, e);
  @@ -879,7 +879,7 @@
        * implement other operations e.g. delete
        */
       abstract Object[][] getColumnValues( Configuration tableConf, CacheHelper queryData, Map objectModel )
  -        throws ConfigurationException, ComponentException;
  +        throws ConfigurationException, ServiceException;
   
       /**
        * Get the String representation of the PreparedStatement.  This is
  @@ -893,6 +893,6 @@
        * @return the insert query as a string
        */
       protected abstract CacheHelper getQuery( Configuration table, Map modeTypes, Map defaultModeNames )
  -        throws ConfigurationException, ComponentException;
  +        throws ConfigurationException, ServiceException;
   
   }
  
  
  
  1.4       +14 -14    cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSourceFactory.java
  
  Index: SlideSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSourceFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SlideSourceFactory.java	24 Mar 2003 14:33:54 -0000	1.3
  +++ SlideSourceFactory.java	25 Oct 2003 18:06:20 -0000	1.4
  @@ -55,13 +55,13 @@
   import java.net.MalformedURLException;
   import java.util.Map;
   
  -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.components.repository.Repository;
   import org.apache.cocoon.components.repository.impl.SlideRepository;
  @@ -80,19 +80,19 @@
    * @version CVS $Id$
    */
   public class SlideSourceFactory extends AbstractLogEnabled
  -  implements SourceFactory, ThreadSafe, Composable, Contextualizable {
  +  implements SourceFactory, ThreadSafe, Serviceable, Contextualizable {
   
  -    /** The component manager instance */
  -    private ComponentManager manager = null;
  +    /** The ServiceManager instance */
  +    private ServiceManager manager = null;
       private Context context;
   
       /**
  -     * Set the current <code>ComponentManager</code> instance used by this
  -     * <code>Composable</code>.
  +     * Set the current <code>ServiceManager</code> instance used by this
  +     * <code>Serviceable</code>.
        *
  -     * @param manager Component manager.
  +     * @param manager ServiceManager.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  @@ -185,12 +185,12 @@
   
               source.enableLogging(getLogger());
               source.contextualize(this.context);
  -            source.compose(this.manager);
  +            source.service(this.manager);
   
               return source;
   
  -        } catch (ComponentException ce) {
  -            getLogger().error("Could not lookup for component.", ce);
  +        } catch (ServiceException se) {
  +            getLogger().error("Could not lookup for service.", se);
           } finally {
               if (repository!=null) {
                   this.manager.release(repository);
  
  
  
  1.9       +14 -15    cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSource.java
  
  Index: SlideSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SlideSource.java	24 Sep 2003 22:34:53 -0000	1.8
  +++ SlideSource.java	25 Oct 2003 18:06:20 -0000	1.9
  @@ -61,16 +61,15 @@
   import java.util.Enumeration;
   import java.util.Vector;
   
  -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.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  +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.CascadingIOException;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.components.source.*;
  @@ -115,15 +114,15 @@
    * @version CVS $Id$
    */
   public class SlideSource extends AbstractLogEnabled
  -  implements Contextualizable, Composable, Source, ModifiableSource,
  +  implements Contextualizable, Serviceable, Source, ModifiableSource,
                ModifiableTraversableSource, MoveableSource, RestrictableSource,
                LockableSource, InspectableSource, VersionableSource {
   
       /** Component context */
       protected Context context;
   
  -    /** Component manager */
  -    private ComponentManager manager;
  +    /** ServiceManager */
  +    private ServiceManager manager;
   
       /** Namespace access token. */
       protected NamespaceAccessToken nat;
  @@ -254,14 +253,14 @@
       }
   
       /**
  -     * Pass the ComponentManager to the composer. The Composable implementation
  -     * should use the specified ComponentManager to acquire the components it needs for execution
  +     * Pass the ServiceManager to the composer. The Serviceable implementation
  +     * should use the specified ServiceManager to acquire the services it needs for execution
        *
  -     * @param manager The ComponentManager which this Composable uses
  +     * @param manager The ServiceManager which this Serviceable uses
        *
  -     * @throws ComponentException
  +     * @throws ServiceException
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  @@ -1694,7 +1693,7 @@
           } catch (Exception e) {
               throw new SourceException("Could not parse property", e);
           } finally {
  -            this.manager.release((Component) parser);
  +            this.manager.release(parser);
           }
   
           return new SourceProperty(doc.getDocumentElement());
  @@ -1742,7 +1741,7 @@
           } catch (Exception e) {
               throw new SourceException("Could not parse property "+xml, e);
           } finally {
  -            this.manager.release((Component) parser);
  +            this.manager.release(parser);
           }
   
           SourceProperty[] sourcepropertiesArray = new SourceProperty[sourceproperties.size()];
  
  
  
  1.4       +10 -10    cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/ContextSourceFactory.java
  
  Index: ContextSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/ContextSourceFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextSourceFactory.java	7 Jun 2003 21:19:36 -0000	1.3
  +++ ContextSourceFactory.java	25 Oct 2003 18:06:20 -0000	1.4
  @@ -58,12 +58,12 @@
   
   import org.apache.excalibur.source.*;
   import org.apache.avalon.framework.activity.Disposable;
  -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.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.Constants;
   import org.apache.cocoon.environment.Context;
  @@ -79,14 +79,14 @@
    */
   public class ContextSourceFactory
       extends AbstractLogEnabled
  -    implements SourceFactory, Composable, Disposable, Contextualizable, ThreadSafe, URIAbsolutizer
  +    implements SourceFactory, Serviceable, Disposable, Contextualizable, ThreadSafe, URIAbsolutizer
   {
   
       /** The context */
       protected Context envContext;
   
  -    /** The component manager */
  -    protected ComponentManager manager;
  +    /** The ServiceManager */
  +    protected ServiceManager manager;
   
       /** The Source Resolver */
       protected SourceResolver resolver;
  @@ -94,7 +94,7 @@
       /**
        * Composable Interface
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
           // FIXME : Looking up the resolver here leads to an infinite loop
           // (is this because of Avalon or CocoonComponentManager ??)
  @@ -136,8 +136,8 @@
           if (this.resolver == null) {
               try {
                   this.resolver = (SourceResolver)this.manager.lookup( SourceResolver.ROLE );
  -            } catch (ComponentException ce) {
  -            	throw new SourceException("Unable to lookup source resolver.", ce);
  +            } catch (ServiceException se) {
  +            	throw new SourceException("Unable to lookup source resolver.", se);
               }
           }
                   
  
  
  
  1.6       +8 -5      cocoon-2.1/src/blocks/xmldb/java/org/apache/cocoon/components/source/impl/XMLDBSource.java
  
  Index: XMLDBSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/xmldb/java/org/apache/cocoon/components/source/impl/XMLDBSource.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLDBSource.java	4 Jul 2003 11:20:51 -0000	1.5
  +++ XMLDBSource.java	25 Oct 2003 18:06:20 -0000	1.6
  @@ -56,10 +56,11 @@
   import java.io.InputStream;
   
   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.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.CascadingIOException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  @@ -106,8 +107,8 @@
       /** The System ID */
       protected String systemId;
   
  -    /** ComponentManager */
  -    protected ComponentManager manager;
  +    /** ServiceManager */
  +    protected ServiceManager manager;
       
       /** Static Strings used for XML Collection representation */
   
  @@ -157,7 +158,7 @@
       public XMLDBSource(Logger logger,
                          SourceCredential credential,
                          String url,
  -                       ComponentManager manager) {
  +                       ServiceManager manager) {
           this.enableLogging(logger);
           this.manager = manager;
   
  @@ -453,6 +454,8 @@
               this.toSAX(serializer);
   
               return new ByteArrayInputStream(os.toByteArray());
  +        } catch (ServiceException se) {
  +            throw new CascadingIOException("could not lookup pipeline components", se);
           } catch (ComponentException cme) {
               throw new CascadingIOException("could not lookup pipeline components", cme);
           } catch (Exception e) {
  
  
  
  1.4       +9 -9      cocoon-2.1/src/blocks/xmldb/java/org/apache/cocoon/components/source/impl/XMLDBSourceFactory.java
  
  Index: XMLDBSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/xmldb/java/org/apache/cocoon/components/source/impl/XMLDBSourceFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLDBSourceFactory.java	25 Oct 2003 11:38:37 -0000	1.3
  +++ XMLDBSourceFactory.java	25 Oct 2003 18:06:20 -0000	1.4
  @@ -55,12 +55,12 @@
   import java.util.HashMap;
   import java.util.Map;
   
  -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.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.cocoon.components.source.helpers.SourceCredential;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceFactory;
  @@ -77,10 +77,10 @@
    */
   public final class XMLDBSourceFactory
           extends AbstractLogEnabled
  -        implements SourceFactory, Configurable, Composable {
  +        implements SourceFactory, Configurable, Serviceable {
   
  -    /** The Component Manager class */
  -    protected ComponentManager m_manager;
  +    /** The ServiceManager instance */
  +    protected ServiceManager m_manager;
   
       /** A Map containing the authentication credentials */
       protected HashMap credentialMap;
  @@ -131,10 +131,10 @@
       }
   
       /**
  -     * Compose this Composable object. We need to pass on the
  -     * ComponentManager to the actual Source.
  +     * Compose this Serviceable object. We need to pass on the
  +     * ServiceManager to the actual Source.
        */
  -    public void compose(ComponentManager cm) {
  +    public void service(ServiceManager cm) {
           this.m_manager = cm;
       }
   
  
  
  
  1.2       +9 -11     cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/AbstractDatabaseAction.java
  
  Index: AbstractDatabaseAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/AbstractDatabaseAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractDatabaseAction.java	9 Mar 2003 00:03:02 -0000	1.1
  +++ AbstractDatabaseAction.java	25 Oct 2003 18:06:20 -0000	1.2
  @@ -52,12 +52,12 @@
   
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.activity.Disposable;
  -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.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   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.environment.Request;
   import org.apache.cocoon.util.ImageProperties;
   import org.apache.cocoon.util.ImageUtils;
  @@ -196,7 +196,7 @@
   public abstract class AbstractDatabaseAction extends AbstractComplementaryConfigurableAction implements Configurable, Disposable {
       protected Map files = new HashMap();
       protected static final Map typeConstants;
  -    protected ComponentSelector dbselector;
  +    protected ServiceSelector dbselector;
   
       static {
           /** Initialize the map of type names to jdbc column types.
  @@ -236,17 +236,15 @@
       /**
        * Compose the Actions so that we can select our databases.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        this.dbselector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE + "Selector");
  -
  -        super.compose(manager);
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
  +        this.dbselector = (ServiceSelector) manager.lookup(DataSourceComponent.ROLE + "Selector");
       }
       /**
        * Get the Datasource we need.
        */
  -    protected final DataSourceComponent getDataSource(Configuration conf) throws ComponentException {
  +    protected final DataSourceComponent getDataSource(Configuration conf) throws ServiceException {
           Configuration dsn = conf.getChild("connection");
  -
           return (DataSourceComponent) this.dbselector.select(dsn.getValue(""));
       }
   
  
  
  
  1.4       +10 -10    cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java
  
  Index: BlobSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BlobSourceFactory.java	5 Sep 2003 07:10:54 -0000	1.3
  +++ BlobSourceFactory.java	25 Oct 2003 18:06:20 -0000	1.4
  @@ -50,10 +50,10 @@
   */
   package org.apache.cocoon.components.source.impl;
   
  -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.excalibur.source.Source;
  @@ -73,10 +73,10 @@
    */
   public class BlobSourceFactory
     extends AbstractLogEnabled
  -  implements Composable, SourceFactory, ThreadSafe {
  +  implements Serviceable, SourceFactory, ThreadSafe {
       
  -    /** The component manager instance */
  -    protected ComponentManager manager;
  +    /** The ServiceManager instance */
  +    protected ServiceManager manager;
   
       /**
        * Get a <code>Source</code> object.
  @@ -86,7 +86,7 @@
           throws MalformedURLException, IOException, SourceException {
           BlobSource blob = new BlobSource(location);
           this.setupLogger(blob);
  -        blob.compose(this.manager);
  +        blob.service(this.manager);
           return blob;
       }
   
  @@ -98,9 +98,9 @@
       }
       
   	/**
  -	 * @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.4       +9 -9      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/source/impl/BlobSource.java
  
  Index: BlobSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/source/impl/BlobSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BlobSource.java	24 Sep 2003 21:54:48 -0000	1.3
  +++ BlobSource.java	25 Oct 2003 18:06:20 -0000	1.4
  @@ -64,10 +64,10 @@
   import java.sql.Types;
   import java.util.Iterator;
   
  -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.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   
  @@ -97,10 +97,10 @@
    * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
    * @version CVS $Id$
    */
  -public class BlobSource extends AbstractLogEnabled implements Source, Composable {
  +public class BlobSource extends AbstractLogEnabled implements Source, Serviceable {
   
  -    /** The component manager instance */
  -    private ComponentManager manager = null;
  +    /** The ServiceManager instance */
  +    private ServiceManager manager = null;
   
       /**
        * The system ID for this source
  @@ -167,10 +167,10 @@
       }
   
       /**
  -     * Set the current <code>ComponentManager</code> instance used by this
  -     * <code>Composable</code>.
  +     * Set the current <code>ServiceManager</code> instance used by this
  +     * <code>Serviceable</code>.
        */
  -    public void compose(ComponentManager manager)  {
  +    public void service(ServiceManager manager)  {
           this.manager = manager;
       }
   
  
  
  

Mime
View raw message