ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/workspace Workspace.java
Date Thu, 21 Feb 2002 11:06:42 GMT
donaldp     02/02/21 03:06:42

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        DefaultExecutionFrame.java DefaultTaskContext.java
                        DefaultWorkspace.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service
                        MultiSourceServiceManager.java ServiceFactory.java
               proposal/myrmidon/src/testcases/org/apache/myrmidon/components
                        AbstractComponentTest.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/executor
                        AspectAwareExecutor.java DefaultExecutor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/aspect
                        AspectManager.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer
                        ClassicConfigurer.java DefaultConfigurer.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer
                        ClassLoaderManager.java
                        DefaultClassLoaderManager.java DefaultDeployer.java
               proposal/myrmidon/src/java/org/apache/myrmidon/framework
                        Condition.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/configurer
                        Configurer.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/converter
                        ConverterRegistry.java MasterConverter.java
               proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer
                        DefaultConfigurerTest.java
               proposal/myrmidon/src/testcases/org/apache/myrmidon/components/deployer
                        DefaultDeployerTest.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/converter
                        DefaultMasterConverter.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/deployer
                        Deployer.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/embeddor
                        Embeddor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys
                        ExecManagerFactory.java VfsManagerFactory.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor
                        Executor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/extensions
                        ExtensionManager.java
               proposal/myrmidon/src/java/org/apache/aut/vfs
                        FileSystemManager.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/model
                        Project.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/builder
                        ProjectBuilder.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/role
                        RoleManager.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/type
                        TypeManager.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/workspace
                        Workspace.java
  Added:       proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        ServiceManagerAdaptor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/service
                        DefaultAntServiceManager.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service
                        AntServiceException.java AntServiceManager.java
  Removed:     proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        ComponentManagerAdaptor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/service
                        DefaultServiceManager.java
               proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service
                        ServiceException.java ServiceManager.java
  Log:
  Rename myrmidons ServiceManager stuff to AntServiceManager
  
  Refactored the codebase to use Avalons ServiceManager rather than ComponentManager. The reason for this is that the ComponentManager required that contained objects implement the Component interface while the ServiceManager constructs do not have this requirement.
  
  This makes it much easier to extract parts of Myrmidon without any dependency on Ant/Avalon
  
  Revision  Changes    Path
  1.5       +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultExecutionFrame.java
  
  Index: DefaultExecutionFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultExecutionFrame.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultExecutionFrame.java	14 Feb 2002 02:12:23 -0000	1.4
  +++ DefaultExecutionFrame.java	21 Feb 2002 11:06:40 -0000	1.5
  @@ -7,7 +7,6 @@
    */
   package org.apache.myrmidon.components.workspace;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
  @@ -17,10 +16,10 @@
    * Frames in which tasks are executed.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.4 $ $Date: 2002/02/14 02:12:23 $
  + * @version $Revision: 1.5 $ $Date: 2002/02/21 11:06:40 $
    */
   class DefaultExecutionFrame
  -    implements ExecutionFrame, Component
  +    implements ExecutionFrame
   {
       private final Logger m_logger;
       private final TaskContext m_context;
  
  
  
  1.14      +7 -7      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
  
  Index: DefaultTaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultTaskContext.java	21 Feb 2002 09:30:51 -0000	1.13
  +++ DefaultTaskContext.java	21 Feb 2002 11:06:40 -0000	1.14
  @@ -19,14 +19,14 @@
   import org.apache.myrmidon.components.configurer.PropertyUtil;
   import org.apache.myrmidon.components.configurer.PropertyException;
   import org.apache.myrmidon.interfaces.configurer.TaskContextAdapter;
  -import org.apache.myrmidon.interfaces.service.ServiceException;
  -import org.apache.myrmidon.interfaces.service.ServiceManager;
  +import org.apache.myrmidon.interfaces.service.AntServiceException;
  +import org.apache.myrmidon.interfaces.service.AntServiceManager;
   
   /**
    * Default implementation of TaskContext.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.13 $ $Date: 2002/02/21 09:30:51 $
  + * @version $Revision: 1.14 $ $Date: 2002/02/21 11:06:40 $
    */
   public class DefaultTaskContext
       implements TaskContext
  @@ -36,7 +36,7 @@
   
       private final Map m_contextData = new Hashtable();
       private final TaskContext m_parent;
  -    private ServiceManager m_serviceManager;
  +    private AntServiceManager m_serviceManager;
   
       /**
        * Constructor for Context with no parent contexts.
  @@ -57,7 +57,7 @@
       /**
        * Constructor that specifies the service directory for context.
        */
  -    public DefaultTaskContext( final ServiceManager serviceManager )
  +    public DefaultTaskContext( final AntServiceManager serviceManager )
       {
           this( null, serviceManager );
       }
  @@ -66,7 +66,7 @@
        * Constructor that takes both parent context and a service directory.
        */
       public DefaultTaskContext( final TaskContext parent,
  -                               final ServiceManager serviceManager )
  +                               final AntServiceManager serviceManager )
       {
           m_parent = parent;
           m_serviceManager = serviceManager;
  @@ -159,7 +159,7 @@
               {
                   return m_serviceManager.getService( serviceClass );
               }
  -            catch( final ServiceException se )
  +            catch( final AntServiceException se )
               {
                   throw new TaskException( se.getMessage(), se );
               }
  
  
  
  1.25      +30 -31    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DefaultWorkspace.java	20 Feb 2002 07:20:21 -0000	1.24
  +++ DefaultWorkspace.java	21 Feb 2002 11:06:40 -0000	1.25
  @@ -14,10 +14,6 @@
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   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.component.DefaultComponentManager;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.LogKitLogger;
  @@ -25,6 +21,10 @@
   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.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.log.Hierarchy;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  @@ -38,7 +38,7 @@
   import org.apache.myrmidon.interfaces.model.Target;
   import org.apache.myrmidon.interfaces.model.TypeLib;
   import org.apache.myrmidon.interfaces.service.MultiSourceServiceManager;
  -import org.apache.myrmidon.interfaces.service.ServiceManager;
  +import org.apache.myrmidon.interfaces.service.AntServiceManager;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   import org.apache.myrmidon.listeners.ProjectListener;
  @@ -47,18 +47,18 @@
    * This is the default implementation of Workspace.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.24 $ $Date: 2002/02/20 07:20:21 $
  + * @version $Revision: 1.25 $ $Date: 2002/02/21 11:06:40 $
    */
   public class DefaultWorkspace
       extends AbstractLogEnabled
  -    implements Workspace, Composable, Parameterizable, Initializable
  +    implements Workspace, Serviceable, Parameterizable, Initializable
   {
       private final static Resources REZ =
           ResourceManager.getPackageResources( DefaultWorkspace.class );
   
       private Executor m_executor;
       private ProjectListenerSupport m_listenerSupport = new ProjectListenerSupport();
  -    private ComponentManager m_componentManager;
  +    private ServiceManager m_serviceManager;
       private Parameters m_parameters;
       private TaskContext m_baseContext;
       private HashMap m_entrys = new HashMap();
  @@ -90,16 +90,16 @@
       /**
        * Retrieve relevent services needed for engine.
        *
  -     * @param componentManager the ComponentManager
  -     * @exception ComponentException if an error occurs
  +     * @param serviceManager the ServiceManager
  +     * @exception ServiceException if an error occurs
        */
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
  -        m_componentManager = componentManager;
  -        m_typeManager = (TypeManager)componentManager.lookup( TypeManager.ROLE );
  -        m_executor = (Executor)componentManager.lookup( Executor.ROLE );
  -        m_deployer = (Deployer)componentManager.lookup( Deployer.ROLE );
  +        m_serviceManager = serviceManager;
  +        m_typeManager = (TypeManager)serviceManager.lookup( TypeManager.ROLE );
  +        m_executor = (Executor)serviceManager.lookup( Executor.ROLE );
  +        m_deployer = (Deployer)serviceManager.lookup( Deployer.ROLE );
       }
   
       public void parameterize( final Parameters parameters )
  @@ -226,48 +226,47 @@
        * Creates an execution frame for a project.
        */
       private ExecutionFrame createExecutionFrame( final Project project )
  -        throws TaskException, ComponentException
  +        throws TaskException, ServiceException
       {
           //Create per frame ComponentManager
  -        final DefaultComponentManager componentManager =
  -            new DefaultComponentManager( m_componentManager );
  +        final DefaultServiceManager serviceManager =
  +            new DefaultServiceManager( m_serviceManager );
   
           //Add in child type manager so each frame can register different
           //sets of tasks etc
           final TypeManager typeManager = m_typeManager.createChildTypeManager();
  -        componentManager.put( TypeManager.ROLE, typeManager );
  +        serviceManager.put( TypeManager.ROLE, typeManager );
   
           //We need to create a new deployer so that it deploys
           //to project specific TypeManager
  -        final Deployer deployer;
  -        deployer = m_deployer.createChildDeployer( componentManager );
  -        componentManager.put( Deployer.ROLE, deployer );
  +        final Deployer deployer = m_deployer.createChildDeployer( serviceManager );
  +        serviceManager.put( Deployer.ROLE, deployer );
   
           // Deploy the imported typelibs
           deployTypeLib( deployer, project );
   
           //We need to place projects and ProjectManager
           //in ComponentManager so as to support project-local call()
  -        componentManager.put( Workspace.ROLE, this );
  -        componentManager.put( Project.ROLE, project );
  +        serviceManager.put( Workspace.ROLE, this );
  +        serviceManager.put( Project.ROLE, project );
   
           final String[] names = project.getProjectNames();
           for( int i = 0; i < names.length; i++ )
           {
               final String name = names[ i ];
               final Project other = project.getProject( name );
  -            componentManager.put( Project.ROLE + "/" + name, other );
  +            serviceManager.put( Project.ROLE + "/" + name, other );
           }
   
           // Create a service manager that aggregates the contents of the context's
           // component manager, and service manager
  -        final MultiSourceServiceManager serviceManager = new MultiSourceServiceManager();
  -        serviceManager.add( (ServiceManager)componentManager.lookup( ServiceManager.ROLE ) );
  -        serviceManager.add( new ComponentManagerAdaptor( componentManager ) );
  +        final MultiSourceServiceManager msServiceManager = new MultiSourceServiceManager();
  +        msServiceManager.add( (AntServiceManager)serviceManager.lookup( AntServiceManager.ROLE ) );
  +        msServiceManager.add( new ServiceManagerAdaptor( serviceManager ) );
   
           // Create and configure the context
           final DefaultTaskContext context =
  -            new DefaultTaskContext( m_baseContext, serviceManager );
  +            new DefaultTaskContext( m_baseContext, msServiceManager );
           context.setProperty( TaskContext.BASE_DIRECTORY, project.getBaseDirectory() );
   
           // Create a logger
  @@ -280,7 +279,7 @@
           /**
            *  @todo Should no occur but done for the time being to simplify evolution.
            */
  -        componentManager.put( ExecutionFrame.ROLE, frame );
  +        serviceManager.put( ExecutionFrame.ROLE, frame );
   
           return frame;
       }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/ServiceManagerAdaptor.java
  
  Index: ServiceManagerAdaptor.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.components.workspace;
  
  import org.apache.myrmidon.interfaces.service.AntServiceException;
  import org.apache.myrmidon.interfaces.service.AntServiceManager;
  import org.apache.avalon.framework.service.ServiceManager;
  import org.apache.avalon.framework.service.ServiceException;
  
  /**
   * An adaptor from {@link ServiceManager} to {@link AntServiceManager}.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/02/21 11:06:40 $
   */
  class ServiceManagerAdaptor
      implements AntServiceManager
  {
      private final ServiceManager m_serviceManager;
  
      public ServiceManagerAdaptor( final ServiceManager componentManager )
      {
          m_serviceManager = componentManager;
      }
  
      /**
       * Determines if this service manager contains a particular service.
       */
      public boolean hasService( Class serviceType )
      {
          return m_serviceManager.hasService( serviceType.getName() );
      }
  
      /**
       * Locates a service instance.
       */
      public Object getService( Class serviceType )
          throws AntServiceException
      {
          try
          {
              return m_serviceManager.lookup( serviceType.getName() );
          }
          catch( final ServiceException se )
          {
              throw new AntServiceException( se.getMessage(), se );
          }
      }
  }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/service/DefaultAntServiceManager.java
  
  Index: DefaultAntServiceManager.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.components.service;
  
  import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Map;
  import org.apache.avalon.excalibur.i18n.ResourceManager;
  import org.apache.avalon.excalibur.i18n.Resources;
  import org.apache.avalon.framework.activity.Disposable;
  import org.apache.avalon.framework.service.ServiceException;
  import org.apache.avalon.framework.service.ServiceManager;
  import org.apache.avalon.framework.service.Serviceable;
  import org.apache.myrmidon.interfaces.service.AntServiceException;
  import org.apache.myrmidon.interfaces.service.AntServiceManager;
  import org.apache.myrmidon.interfaces.service.ServiceFactory;
  import org.apache.myrmidon.interfaces.type.TypeException;
  import org.apache.myrmidon.interfaces.type.TypeFactory;
  import org.apache.myrmidon.interfaces.type.TypeManager;
  
  /**
   * A service manager implementation.  This implementation takes care of
   * creating service instances, using a {@link ServiceFactory}, and running the
   * service instances through the service lifecycle.  Service creation happens
   * on demand.
   *
   * <p>This implementation uses a TypeManager to locate the service factories.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/02/21 11:06:40 $
   */
  public class DefaultAntServiceManager
      implements AntServiceManager, Serviceable, Disposable
  {
      private final static Resources REZ =
          ResourceManager.getPackageResources( DefaultAntServiceManager.class );
  
      /** Map from service class -> service object. */
      private Map m_services = new HashMap();
  
      private TypeFactory m_typeFactory;
  
      /**
       * Pass the <code>ServiceManager</code> to the <code>servicable</code>.
       * The <code>Servicable</code> implementation should use the specified
       * <code>ServiceManager</code> to acquire the components it needs for
       * execution.
       *
       * @param manager The <code>ServiceManager</code> which this
       *                <code>Servicable</code> uses.
       */
      public void service( ServiceManager manager )
          throws ServiceException
      {
          final TypeManager typeManager = (TypeManager)manager.lookup( TypeManager.ROLE );
          try
          {
              m_typeFactory = typeManager.getFactory( ServiceFactory.class );
          }
          catch( final TypeException e )
          {
              throw new ServiceException( e.getMessage(), e );
          }
      }
  
      /**
       * Disposes this service manager, and all services created by it.
       */
      public void dispose()
      {
          // Dispose the services
          for( Iterator iterator = m_services.values().iterator(); iterator.hasNext(); )
          {
              final Object object = iterator.next();
              if( object instanceof Disposable )
              {
                  ( (Disposable)object ).dispose();
              }
          }
  
          // Ditch state
          m_services = null;
          m_typeFactory = null;
      }
  
      /**
       * Determines if this service manager contains a particular service.
       */
      public boolean hasService( Class serviceType )
      {
          // If we have already instantiated the service, or if we know how
          // to instantiate it, then return true
          if( m_services.containsKey( serviceType ) )
          {
              return true;
          }
          if( m_typeFactory.canCreate( serviceType.getName() ) )
          {
              return true;
          }
  
          return false;
      }
  
      /**
       * Locates a service instance.
       */
      public Object getService( Class serviceType )
          throws AntServiceException
      {
          Object service = m_services.get( serviceType );
          if( service == null )
          {
              // Create the service
              service = createService( serviceType );
              m_services.put( serviceType, service );
          }
  
          return service;
      }
  
      /**
       * Creates the service object for a service class.
       */
      private Object createService( Class serviceType ) throws AntServiceException
      {
          try
          {
              final ServiceFactory factory = (ServiceFactory)m_typeFactory.create( serviceType.getName() );
  
              // Create the service
              final Object service = factory.createService();
              if( !serviceType.isInstance( service ) )
              {
                  final String message = REZ.getString( "mismatched-service-type.error", serviceType.getName(), service.getClass().getName() );
                  throw new AntServiceException( message );
              }
              return service;
          }
          catch( final Exception e )
          {
              final String message = REZ.getString( "create-service.error", serviceType.getName() );
              throw new AntServiceException( message, e );
          }
      }
  }
  
  
  
  1.3       +9 -9      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service/MultiSourceServiceManager.java
  
  Index: MultiSourceServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service/MultiSourceServiceManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MultiSourceServiceManager.java	18 Feb 2002 08:39:58 -0000	1.2
  +++ MultiSourceServiceManager.java	21 Feb 2002 11:06:40 -0000	1.3
  @@ -13,13 +13,13 @@
   
   /**
    * A service manager that aggregates services from several
  - * {@link ServiceManager} objects.
  + * {@link AntServiceManager} objects.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/02/18 08:39:58 $
  + * @version $Revision: 1.3 $ $Date: 2002/02/21 11:06:40 $
    */
   public class MultiSourceServiceManager
  -    implements ServiceManager
  +    implements AntServiceManager
   {
       private final static Resources REZ
           = ResourceManager.getPackageResources( MultiSourceServiceManager.class );
  @@ -30,7 +30,7 @@
       /**
        * Adds a service manager to the end of the source list.
        */
  -    public void add( final ServiceManager mgr )
  +    public void add( final AntServiceManager mgr )
       {
           m_sources.add( mgr );
       }
  @@ -45,7 +45,7 @@
           final int size = m_sources.size();
           for( int i = 0; i < size; i++ )
           {
  -            final ServiceManager serviceManager = (ServiceManager)m_sources.get( i );
  +            final AntServiceManager serviceManager = (AntServiceManager)m_sources.get( i );
               if( serviceManager.hasService( serviceType ) )
               {
                   return true;
  @@ -60,15 +60,15 @@
        * @param serviceType The service interface.
        * @return The service instance.  The returned object is guaranteed to
        *         implement the service interface.
  -     * @throws ServiceException If the service does not exist.
  +     * @throws AntServiceException If the service does not exist.
        */
       public Object getService( final Class serviceType )
  -        throws ServiceException
  +        throws AntServiceException
       {
           final int size = m_sources.size();
           for( int i = 0; i < size; i++ )
           {
  -            final ServiceManager serviceManager = (ServiceManager)m_sources.get( i );
  +            final AntServiceManager serviceManager = (AntServiceManager)m_sources.get( i );
               if( serviceManager.hasService( serviceType ) )
               {
                   return serviceManager.getService( serviceType );
  @@ -76,6 +76,6 @@
           }
   
           final String message = REZ.getString( "unknown-service.error", serviceType.getName() );
  -        throw new ServiceException( message );
  +        throw new AntServiceException( message );
       }
   }
  
  
  
  1.2       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service/ServiceFactory.java
  
  Index: ServiceFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service/ServiceFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceFactory.java	14 Feb 2002 02:03:25 -0000	1.1
  +++ ServiceFactory.java	21 Feb 2002 11:06:40 -0000	1.2
  @@ -13,7 +13,7 @@
    * preparing the service for use.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/02/14 02:03:25 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/21 11:06:40 $
    */
   public interface ServiceFactory
   {
  @@ -25,5 +25,5 @@
        * prepared and configured as appropriate.
        */
       Object createService()
  -        throws ServiceException;
  +        throws AntServiceException;
   }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service/AntServiceException.java
  
  Index: AntServiceException.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.interfaces.service;
  
  import org.apache.avalon.framework.CascadingException;
  
  /**
   * ServiceException thrown when a service can not be created for
   * some reason.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/02/21 11:06:40 $
   */
  public class AntServiceException
      extends CascadingException
  {
      /**
       * Basic constructor for exception that does not specify a message
       */
      public AntServiceException()
      {
          this( "", null );
      }
  
      /**
       * Basic constructor with a message
       *
       * @param message the message
       */
      public AntServiceException( final String message )
      {
          this( message, null );
      }
  
      /**
       * Constructor that builds cascade so that other exception information can be retained.
       *
       * @param message the message
       * @param throwable the throwable
       */
      public AntServiceException( final String message, final Throwable throwable )
      {
          super( message, throwable );
      }
  }
  
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/service/AntServiceManager.java
  
  Index: AntServiceManager.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.interfaces.service;
  
  /**
   * Manages a set of services.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/02/21 11:06:40 $
   */
  public interface AntServiceManager
  {
      String ROLE = AntServiceManager.class.getName();
  
      /**
       * Determines if this service manager contains a particular service.
       *
       * @param serviceType The service interface.
       */
      boolean hasService( Class serviceType );
  
      /**
       * Locates a service instance.
       *
       * @param serviceType The service interface.
       * @return The service instance.  The returned object is guaranteed to
       *         implement the service interface.
       * @throws AntServiceException If the service does not exist.
       */
      Object getService( Class serviceType )
          throws AntServiceException;
  }
  
  
  
  1.7       +26 -28    jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/AbstractComponentTest.java
  
  Index: AbstractComponentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/AbstractComponentTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractComponentTest.java	21 Feb 2002 10:16:43 -0000	1.6
  +++ AbstractComponentTest.java	21 Feb 2002 11:06:40 -0000	1.7
  @@ -10,13 +10,12 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  -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.component.DefaultComponentManager;
   import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.service.DefaultServiceManager;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.AbstractMyrmidonTest;
   import org.apache.myrmidon.components.configurer.DefaultConfigurer;
   import org.apache.myrmidon.components.converter.DefaultConverterRegistry;
  @@ -26,7 +25,6 @@
   import org.apache.myrmidon.components.deployer.DefaultDeployer;
   import org.apache.myrmidon.components.extensions.DefaultExtensionManager;
   import org.apache.myrmidon.components.role.DefaultRoleManager;
  -import org.apache.myrmidon.components.service.DefaultServiceManager;
   import org.apache.myrmidon.components.type.DefaultTypeManager;
   import org.apache.aut.converter.Converter;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
  @@ -35,7 +33,6 @@
   import org.apache.myrmidon.interfaces.deployer.Deployer;
   import org.apache.myrmidon.interfaces.extensions.ExtensionManager;
   import org.apache.myrmidon.interfaces.role.RoleManager;
  -import org.apache.myrmidon.interfaces.service.ServiceManager;
   import org.apache.myrmidon.interfaces.type.DefaultTypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeException;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  @@ -48,7 +45,7 @@
   public abstract class AbstractComponentTest
       extends AbstractMyrmidonTest
   {
  -    private DefaultComponentManager m_componentManager;
  +    private DefaultServiceManager m_serviceManager;
       private Logger m_logger;
   
       public AbstractComponentTest( final String name )
  @@ -59,17 +56,18 @@
       /**
        * Returns the component manager containing the components to test.
        */
  -    protected ComponentManager getComponentManager()
  +    protected ServiceManager getServiceManager()
       {
  -        return m_componentManager;
  +        return m_serviceManager;
       }
   
       /**
        * Returns the type manager.
        */
  -    protected TypeManager getTypeManager() throws ComponentException
  +    protected TypeManager getTypeManager()
  +        throws ServiceException
       {
  -        return (TypeManager)getComponentManager().lookup( TypeManager.ROLE );
  +        return (TypeManager)getServiceManager().lookup( TypeManager.ROLE );
       }
   
       /**
  @@ -81,44 +79,44 @@
           m_logger = createLogger();
   
           // Create the components
  -        m_componentManager = new DefaultComponentManager();
  +        m_serviceManager = new DefaultServiceManager();
           List components = new ArrayList();
   
  -        Component component = new DefaultMasterConverter();
  -        m_componentManager.put( MasterConverter.ROLE, component );
  +        Object component = new DefaultMasterConverter();
  +        m_serviceManager.put( MasterConverter.ROLE, component );
           components.add( component );
   
           component = new DefaultConverterRegistry();
  -        m_componentManager.put( ConverterRegistry.ROLE, component );
  +        m_serviceManager.put( ConverterRegistry.ROLE, component );
           components.add( component );
   
           component = new DefaultTypeManager();
  -        m_componentManager.put( TypeManager.ROLE, component );
  +        m_serviceManager.put( TypeManager.ROLE, component );
           components.add( component );
   
           component = new DefaultConfigurer();
  -        m_componentManager.put( Configurer.ROLE, component );
  +        m_serviceManager.put( Configurer.ROLE, component );
           components.add( component );
   
           component = new DefaultDeployer();
  -        m_componentManager.put( Deployer.ROLE, component );
  +        m_serviceManager.put( Deployer.ROLE, component );
           components.add( component );
   
           final DefaultClassLoaderManager classLoaderMgr = new DefaultClassLoaderManager();
           classLoaderMgr.setBaseClassLoader( getClass().getClassLoader() );
  -        m_componentManager.put( ClassLoaderManager.ROLE, classLoaderMgr );
  +        m_serviceManager.put( ClassLoaderManager.ROLE, classLoaderMgr );
           components.add( classLoaderMgr );
   
           component = new DefaultExtensionManager();
  -        m_componentManager.put( ExtensionManager.ROLE, component );
  +        m_serviceManager.put( ExtensionManager.ROLE, component );
           components.add( component );
   
           component = new DefaultRoleManager();
  -        m_componentManager.put( RoleManager.ROLE, component );
  +        m_serviceManager.put( RoleManager.ROLE, component );
           components.add( component );
   
           component = new DefaultServiceManager();
  -        m_componentManager.put( ServiceManager.ROLE, component );
  +        m_serviceManager.put( ServiceManager.ROLE, component );
           components.add( component );
   
           // Log enable the components
  @@ -136,10 +134,10 @@
           for( Iterator iterator = components.iterator(); iterator.hasNext(); )
           {
               Object obj = iterator.next();
  -            if( obj instanceof Composable )
  +            if( obj instanceof Serviceable )
               {
  -                final Composable composable = (Composable)obj;
  -                composable.compose( m_componentManager );
  +                final Serviceable serviceable = (Serviceable)obj;
  +                serviceable.service( m_serviceManager );
               }
           }
       }
  @@ -151,9 +149,9 @@
       protected void registerConverter( final Class converterClass,
                                         final Class sourceClass,
                                         final Class destClass )
  -        throws ComponentException, TypeException
  +        throws ServiceException, TypeException
       {
  -        ConverterRegistry converterRegistry = (ConverterRegistry)getComponentManager().lookup( ConverterRegistry.ROLE );
  +        ConverterRegistry converterRegistry = (ConverterRegistry)getServiceManager().lookup( ConverterRegistry.ROLE );
           converterRegistry.registerConverter( converterClass.getName(), sourceClass.getName(), destClass.getName() );
           DefaultTypeFactory factory = new DefaultTypeFactory( getClass().getClassLoader() );
           factory.addNameClassMapping( converterClass.getName(), converterClass.getName() );
  
  
  
  1.18      +9 -9      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java
  
  Index: AspectAwareExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- AspectAwareExecutor.java	7 Feb 2002 13:02:20 -0000	1.17
  +++ AspectAwareExecutor.java	21 Feb 2002 11:06:40 -0000	1.18
  @@ -11,13 +11,13 @@
   import java.util.HashMap;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.DefaultConfiguration;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.ServiceException;
   import org.apache.myrmidon.api.Task;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.aspect.AspectManager;
  @@ -28,7 +28,7 @@
    * the aspects helpers.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.17 $ $Date: 2002/02/07 13:02:20 $
  + * @version $Revision: 1.18 $ $Date: 2002/02/21 11:06:40 $
    */
   public class AspectAwareExecutor
       extends DefaultExecutor
  @@ -43,15 +43,15 @@
       /**
        * Retrieve relevent services.
        *
  -     * @param componentManager the ComponentManager
  -     * @exception ComponentException if an error occurs
  +     * @param serviceManager the ServiceManager
  +     * @exception ServiceException if an error occurs
        */
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
  -        super.compose( componentManager );
  +        super.service( serviceManager );
   
  -        m_aspectManager = (AspectManager)componentManager.lookup( AspectManager.ROLE );
  +        m_aspectManager = (AspectManager)serviceManager.lookup( AspectManager.ROLE );
       }
   
       public void execute( final Configuration taskModel, final ExecutionFrame frame )
  
  
  
  1.26      +10 -10    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
  
  Index: DefaultExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- DefaultExecutor.java	21 Feb 2002 09:36:24 -0000	1.25
  +++ DefaultExecutor.java	21 Feb 2002 11:06:40 -0000	1.26
  @@ -9,13 +9,13 @@
   
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -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.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.service.Serviceable;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.myrmidon.api.Task;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  @@ -30,11 +30,11 @@
    * The basic executor that just executes the tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.25 $ $Date: 2002/02/21 09:36:24 $
  + * @version $Revision: 1.26 $ $Date: 2002/02/21 11:06:40 $
    */
   public class DefaultExecutor
       extends AbstractLogEnabled
  -    implements Executor, Composable
  +    implements Executor, Serviceable
   {
       private final static Resources REZ =
           ResourceManager.getPackageResources( DefaultExecutor.class );
  @@ -44,13 +44,13 @@
       /**
        * Retrieve relevent services needed to deploy.
        *
  -     * @param componentManager the ComponentManager
  -     * @exception ComponentException if an error occurs
  +     * @param serviceManager the ServiceManager
  +     * @exception ServiceException if an error occurs
        */
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
  -        m_configurer = (Configurer)componentManager.lookup( Configurer.ROLE );
  +        m_configurer = (Configurer)serviceManager.lookup( Configurer.ROLE );
       }
   
       public void execute( final Configuration taskModel, final ExecutionFrame frame )
  
  
  
  1.6       +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/aspect/AspectManager.java
  
  Index: AspectManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/aspect/AspectManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AspectManager.java	7 Feb 2002 13:01:19 -0000	1.5
  +++ AspectManager.java	21 Feb 2002 11:06:40 -0000	1.6
  @@ -7,7 +7,6 @@
    */
   package org.apache.myrmidon.interfaces.aspect;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.myrmidon.api.TaskException;
  @@ -17,10 +16,10 @@
    * Manage and propogate Aspects.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/02/07 13:01:19 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/21 11:06:40 $
    */
   public interface AspectManager
  -    extends Component, AspectHandler
  +    extends AspectHandler
   {
       String ROLE = AspectManager.class.getName();
   
  
  
  
  1.5       +9 -8      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/ClassicConfigurer.java
  
  Index: ClassicConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/ClassicConfigurer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClassicConfigurer.java	21 Feb 2002 10:16:42 -0000	1.4
  +++ ClassicConfigurer.java	21 Feb 2002 11:06:40 -0000	1.5
  @@ -12,15 +12,15 @@
   import java.util.ArrayList;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -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.context.Context;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.LogEnabled;
  +import org.apache.avalon.framework.service.Serviceable;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.aut.converter.ConverterException;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.converter.MasterConverter;
  @@ -32,7 +32,7 @@
    */
   public class ClassicConfigurer
       extends AbstractLogEnabled
  -    implements Configurer, Composable, LogEnabled
  +    implements Configurer, Serviceable, LogEnabled
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( DefaultConfigurer.class );
  @@ -43,10 +43,10 @@
       ///Converter to use for converting between values
       private MasterConverter m_converter;
   
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
  -        m_converter = (MasterConverter)componentManager.lookup( MasterConverter.ROLE );
  +        m_converter = (MasterConverter)serviceManager.lookup( MasterConverter.ROLE );
       }
   
       /**
  @@ -81,7 +81,8 @@
                   getLogger().debug( message );
               }
   
  -            ( (Configurable)object ).configure( configuration );
  +            final Configurable configurable = (Configurable)object;
  +            configurable.configure( configuration );
           }
           else
           {
  
  
  
  1.28      +18 -12    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
  
  Index: DefaultConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DefaultConfigurer.java	21 Feb 2002 09:34:23 -0000	1.27
  +++ DefaultConfigurer.java	21 Feb 2002 11:06:40 -0000	1.28
  @@ -11,17 +11,17 @@
   import java.util.Map;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.CascadingException;
  -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.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  +import org.apache.avalon.framework.context.Resolvable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.LogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.framework.DataType;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.converter.MasterConverter;
  @@ -34,11 +34,11 @@
    * Class used to configure tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.27 $ $Date: 2002/02/21 09:34:23 $
  + * @version $Revision: 1.28 $ $Date: 2002/02/21 11:06:40 $
    */
   public class DefaultConfigurer
       extends AbstractLogEnabled
  -    implements Configurer, Composable, LogEnabled
  +    implements Configurer, Serviceable, LogEnabled
   {
       private final static Resources REZ =
           ResourceManager.getPackageResources( DefaultConfigurer.class );
  @@ -56,12 +56,12 @@
       ///ObjectConfigurer for that class.
       private Map m_configurerCache = new HashMap();
   
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
  -        m_converter = (MasterConverter)componentManager.lookup( MasterConverter.ROLE );
  -        m_typeManager = (TypeManager)componentManager.lookup( TypeManager.ROLE );
  -        m_roleManager = (RoleManager)componentManager.lookup( RoleManager.ROLE );
  +        m_converter = (MasterConverter)serviceManager.lookup( MasterConverter.ROLE );
  +        m_typeManager = (TypeManager)serviceManager.lookup( TypeManager.ROLE );
  +        m_roleManager = (RoleManager)serviceManager.lookup( RoleManager.ROLE );
       }
   
       /**
  @@ -391,8 +391,14 @@
           Object objValue = PropertyUtil.resolveProperty( value, context, false );
   
           // Convert the value to the appropriate type
  +
  +        Object converterContext = context;
  +        if( context instanceof Resolvable )
  +        {
  +            converterContext = ( (Resolvable)context ).resolve( context );
  +        }
           final Class clazz = setter.getType();
  -        objValue = m_converter.convert( clazz, objValue, context );
  +        objValue = m_converter.convert( clazz, objValue, converterContext );
   
           // Set the value
           setter.addValue( state, objValue );
  
  
  
  1.3       +0 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/ClassLoaderManager.java
  
  Index: ClassLoaderManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/ClassLoaderManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassLoaderManager.java	12 Feb 2002 10:40:08 -0000	1.2
  +++ ClassLoaderManager.java	21 Feb 2002 11:06:41 -0000	1.3
  @@ -8,7 +8,6 @@
   package org.apache.myrmidon.components.deployer;
   
   import java.io.File;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.myrmidon.interfaces.deployer.DeploymentException;
   
   /**
  @@ -17,7 +16,6 @@
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    */
   public interface ClassLoaderManager
  -    extends Component
   {
       String ROLE = ClassLoaderManager.class.getName();
   
  
  
  
  1.2       +8 -8      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultClassLoaderManager.java
  
  Index: DefaultClassLoaderManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultClassLoaderManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultClassLoaderManager.java	10 Feb 2002 02:34:13 -0000	1.1
  +++ DefaultClassLoaderManager.java	21 Feb 2002 11:06:41 -0000	1.2
  @@ -23,10 +23,10 @@
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   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.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.Serviceable;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.myrmidon.interfaces.deployer.DeploymentException;
   import org.apache.myrmidon.interfaces.extensions.ExtensionManager;
   
  @@ -37,7 +37,7 @@
    */
   public class DefaultClassLoaderManager
       extends AbstractLogEnabled
  -    implements ClassLoaderManager, Composable, Initializable
  +    implements ClassLoaderManager, Serviceable, Initializable
   {
       private final static Resources REZ =
           ResourceManager.getPackageResources( DefaultClassLoaderManager.class );
  @@ -52,7 +52,7 @@
   
       public void initialize() throws Exception
       {
  -        if( m_baseClassLoader == null )
  +        if( null == m_baseClassLoader )
           {
               m_baseClassLoader = Thread.currentThread().getContextClassLoader();
           }
  @@ -70,11 +70,11 @@
       /**
        * Retrieve relevent services needed to deploy.
        */
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
           final ExtensionManager extensionManager =
  -            (ExtensionManager)componentManager.lookup( ExtensionManager.ROLE );
  +            (ExtensionManager)serviceManager.lookup( ExtensionManager.ROLE );
           m_packageManager = new PackageManager( extensionManager );
       }
   
  
  
  
  1.27      +20 -20    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java
  
  Index: DefaultDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- DefaultDeployer.java	21 Feb 2002 10:16:43 -0000	1.26
  +++ DefaultDeployer.java	21 Feb 2002 11:06:41 -0000	1.27
  @@ -11,13 +11,13 @@
   import java.net.URL;
   import java.util.HashMap;
   import java.util.Map;
  +import org.apache.aut.converter.Converter;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -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.aut.converter.Converter;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.interfaces.converter.ConverterRegistry;
   import org.apache.myrmidon.interfaces.deployer.ConverterDefinition;
   import org.apache.myrmidon.interfaces.deployer.Deployer;
  @@ -25,8 +25,8 @@
   import org.apache.myrmidon.interfaces.deployer.TypeDefinition;
   import org.apache.myrmidon.interfaces.deployer.TypeDeployer;
   import org.apache.myrmidon.interfaces.role.RoleManager;
  +import org.apache.myrmidon.interfaces.service.AntServiceManager;
   import org.apache.myrmidon.interfaces.service.ServiceFactory;
  -import org.apache.myrmidon.interfaces.service.ServiceManager;
   import org.apache.myrmidon.interfaces.type.DefaultTypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   
  @@ -35,11 +35,11 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.26 $ $Date: 2002/02/21 10:16:43 $
  + * @version $Revision: 1.27 $ $Date: 2002/02/21 11:06:41 $
    */
   public class DefaultDeployer
       extends AbstractLogEnabled
  -    implements Deployer, Composable
  +    implements Deployer, Serviceable
   {
       private final static Resources REZ =
           ResourceManager.getPackageResources( DefaultDeployer.class );
  @@ -52,33 +52,33 @@
   
       /** Map from ClassLoader to the deployer for that class loader. */
       private final Map m_classLoaderDeployers = new HashMap();
  -    private ServiceManager m_ServiceManager;
  +    private AntServiceManager m_serviceManager;
   
       /**
        * Retrieve relevent services needed to deploy.
        *
  -     * @param componentManager the ComponentManager
  -     * @exception ComponentException if an error occurs
  +     * @param serviceManager the ServiceManager
  +     * @exception ServiceException if an error occurs
        */
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
  -        m_converterRegistry = (ConverterRegistry)componentManager.lookup( ConverterRegistry.ROLE );
  -        m_typeManager = (TypeManager)componentManager.lookup( TypeManager.ROLE );
  -        m_roleManager = (RoleManager)componentManager.lookup( RoleManager.ROLE );
  -        m_classLoaderManager = (ClassLoaderManager)componentManager.lookup( ClassLoaderManager.ROLE );
  -        m_ServiceManager = (ServiceManager)componentManager.lookup( ServiceManager.ROLE );
  +        m_converterRegistry = (ConverterRegistry)serviceManager.lookup( ConverterRegistry.ROLE );
  +        m_typeManager = (TypeManager)serviceManager.lookup( TypeManager.ROLE );
  +        m_roleManager = (RoleManager)serviceManager.lookup( RoleManager.ROLE );
  +        m_classLoaderManager = (ClassLoaderManager)serviceManager.lookup( ClassLoaderManager.ROLE );
  +        m_serviceManager = (AntServiceManager)serviceManager.lookup( AntServiceManager.ROLE );
       }
   
       /**
        * Creates a child deployer.
        */
  -    public Deployer createChildDeployer( ComponentManager componentManager )
  -        throws ComponentException
  +    public Deployer createChildDeployer( final ServiceManager componentManager )
  +        throws ServiceException
       {
           final DefaultDeployer child = new DefaultDeployer();
           setupLogger( child );
  -        child.compose( componentManager );
  +        child.service( componentManager );
           return child;
       }
   
  
  
  
  1.14      +1 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Condition.java
  
  Index: Condition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Condition.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Condition.java	21 Feb 2002 09:37:52 -0000	1.13
  +++ Condition.java	21 Feb 2002 11:06:41 -0000	1.14
  @@ -7,7 +7,6 @@
    */
   package org.apache.myrmidon.framework;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   
  @@ -15,10 +14,9 @@
    * Class representing a condition.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.13 $ $Date: 2002/02/21 09:37:52 $
  + * @version $Revision: 1.14 $ $Date: 2002/02/21 11:06:41 $
    */
   public class Condition
  -    implements Component
   {
       private String m_condition;
       private boolean m_isIfCondition;
  
  
  
  1.6       +1 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java
  
  Index: Configurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/configurer/Configurer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Configurer.java	7 Feb 2002 13:01:20 -0000	1.5
  +++ Configurer.java	21 Feb 2002 11:06:41 -0000	1.6
  @@ -7,7 +7,6 @@
    */
   package org.apache.myrmidon.interfaces.configurer;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.context.Context;
  @@ -16,10 +15,9 @@
    * Class used to configure tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/02/07 13:01:20 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/21 11:06:41 $
    */
   public interface Configurer
  -    extends Component
   {
       String ROLE = Configurer.class.getName();
   
  
  
  
  1.6       +1 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/converter/ConverterRegistry.java
  
  Index: ConverterRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/converter/ConverterRegistry.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ConverterRegistry.java	7 Feb 2002 13:01:20 -0000	1.5
  +++ ConverterRegistry.java	21 Feb 2002 11:06:41 -0000	1.6
  @@ -7,16 +7,13 @@
    */
   package org.apache.myrmidon.interfaces.converter;
   
  -import org.apache.avalon.framework.component.Component;
  -
   /**
    * Interface for registry for ConverterInfos.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/02/07 13:01:20 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/21 11:06:41 $
    */
   public interface ConverterRegistry
  -    extends Component
   {
       String ROLE = ConverterRegistry.class.getName();
   
  
  
  
  1.7       +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/converter/MasterConverter.java
  
  Index: MasterConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/converter/MasterConverter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MasterConverter.java	21 Feb 2002 10:16:43 -0000	1.6
  +++ MasterConverter.java	21 Feb 2002 11:06:41 -0000	1.7
  @@ -7,17 +7,16 @@
    */
   package org.apache.myrmidon.interfaces.converter;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.aut.converter.Converter;
   
   /**
    * Master Converter to handle converting between types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/02/21 10:16:43 $
  + * @version $Revision: 1.7 $ $Date: 2002/02/21 11:06:41 $
    */
   public interface MasterConverter
  -    extends Component, Converter
  +    extends Converter
   {
       String ROLE = MasterConverter.class.getName();
   }
  
  
  
  1.13      +3 -3      jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java
  
  Index: DefaultConfigurerTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultConfigurerTest.java	14 Feb 2002 02:12:23 -0000	1.12
  +++ DefaultConfigurerTest.java	21 Feb 2002 11:06:41 -0000	1.13
  @@ -49,7 +49,7 @@
           super.setUp();
   
           // Find the configurer
  -        m_configurer = (Configurer)getComponentManager().lookup( Configurer.ROLE );
  +        m_configurer = (Configurer)getServiceManager().lookup( Configurer.ROLE );
   
           // Setup a context
           m_context = new DefaultTaskContext();
  @@ -434,7 +434,7 @@
           config.setAttribute( "my-role1", "some value" );
   
           // Set up the converter and role
  -        RoleManager roleMgr = (RoleManager)getComponentManager().lookup( RoleManager.ROLE );
  +        RoleManager roleMgr = (RoleManager)getServiceManager().lookup( RoleManager.ROLE );
           roleMgr.addNameRoleMapping( "my-role1", MyRole1.ROLE );
           registerConverter( StringToMyRole1Converter.class, String.class, MyRole1.class );
   
  @@ -611,7 +611,7 @@
           config.addChild( child );
   
           // Add role mapping, and add to reference to context
  -        final RoleManager roleMgr = (RoleManager)getComponentManager().lookup( RoleManager.ROLE );
  +        final RoleManager roleMgr = (RoleManager)getServiceManager().lookup( RoleManager.ROLE );
           roleMgr.addNameRoleMapping( "my-role1", MyRole1.class.getName() );
           m_context.setProperty( "id", new MyType1() );
           m_context.setProperty( "id2", new MyType2() );
  
  
  
  1.8       +3 -3      jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/deployer/DefaultDeployerTest.java
  
  Index: DefaultDeployerTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/deployer/DefaultDeployerTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultDeployerTest.java	21 Feb 2002 10:16:43 -0000	1.7
  +++ DefaultDeployerTest.java	21 Feb 2002 11:06:41 -0000	1.8
  @@ -49,11 +49,11 @@
       protected void setUp() throws Exception
       {
           super.setUp();
  -        m_deployer = (Deployer)getComponentManager().lookup( Deployer.ROLE );
  -        m_converter = (MasterConverter)getComponentManager().lookup( MasterConverter.ROLE );
  +        m_deployer = (Deployer)getServiceManager().lookup( Deployer.ROLE );
  +        m_converter = (MasterConverter)getServiceManager().lookup( MasterConverter.ROLE );
   
           // Add some core roles
  -        m_roleManager = (RoleManager)getComponentManager().lookup( RoleManager.ROLE );
  +        m_roleManager = (RoleManager)getServiceManager().lookup( RoleManager.ROLE );
           m_roleManager.addNameRoleMapping( DATA_TYPE_ROLE, DataType.ROLE );
           m_roleManager.addNameRoleMapping( "converter", Converter.ROLE );
       }
  
  
  
  1.28      +20 -25    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DefaultEmbeddor.java	20 Feb 2002 07:20:21 -0000	1.27
  +++ DefaultEmbeddor.java	21 Feb 2002 11:06:41 -0000	1.28
  @@ -18,12 +18,11 @@
   import org.apache.avalon.excalibur.io.FileUtil;
   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.Composable;
  -import org.apache.avalon.framework.component.DefaultComponentManager;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.Parameterizable;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.DefaultServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.components.deployer.ClassLoaderManager;
   import org.apache.myrmidon.interfaces.aspect.AspectManager;
   import org.apache.myrmidon.interfaces.builder.ProjectBuilder;
  @@ -38,7 +37,7 @@
   import org.apache.myrmidon.interfaces.extensions.ExtensionManager;
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.interfaces.role.RoleManager;
  -import org.apache.myrmidon.interfaces.service.ServiceManager;
  +import org.apache.myrmidon.interfaces.service.AntServiceManager;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  @@ -49,7 +48,7 @@
    * Instantiate this to embed inside other applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.27 $ $Date: 2002/02/20 07:20:21 $
  + * @version $Revision: 1.28 $ $Date: 2002/02/21 11:06:41 $
    */
   public class DefaultEmbeddor
       extends AbstractLogEnabled
  @@ -65,7 +64,7 @@
       private TypeManager m_typeManager;
   
       private List m_components = new ArrayList();
  -    private DefaultComponentManager m_componentManager = new DefaultComponentManager();
  +    private DefaultServiceManager m_serviceManager = new DefaultServiceManager();
       private Parameters m_parameters;
       private Parameters m_defaults;
   
  @@ -123,7 +122,7 @@
       {
           final String component = getParameter( Workspace.ROLE );
           final Workspace workspace =
  -            (Workspace)createComponent( component, Workspace.class );
  +            (Workspace)createService( component, Workspace.class );
           setupObject( workspace, parameters );
           return workspace;
       }
  @@ -158,8 +157,8 @@
           //setup the components
           setupComponents();
   
  -        m_deployer = (Deployer)m_componentManager.lookup( Deployer.ROLE );
  -        m_typeManager = (TypeManager)m_componentManager.lookup( TypeManager.ROLE );
  +        m_deployer = (Deployer)m_serviceManager.lookup( Deployer.ROLE );
  +        m_typeManager = (TypeManager)m_serviceManager.lookup( TypeManager.ROLE );
   
           setupFiles();
       }
  @@ -193,17 +192,18 @@
           // Dispose any disposable components
           for( Iterator iterator = m_components.iterator(); iterator.hasNext(); )
           {
  -            Component component = (Component)iterator.next();
  +            Object component = iterator.next();
               if( component instanceof Disposable )
               {
  -                ( (Disposable)component ).dispose();
  +                final Disposable disposable = (Disposable)component;
  +                disposable.dispose();
               }
           }
   
           // Ditch everything
           m_components = null;
           m_deployer = null;
  -        m_componentManager = null;
  +        m_serviceManager = null;
           m_parameters = null;
           m_defaults = null;
           m_homeDir = null;
  @@ -246,7 +246,7 @@
           createComponent( Deployer.class, PREFIX + "deployer.DefaultDeployer" );
           createComponent( ClassLoaderManager.class, PREFIX + "deployer.DefaultClassLoaderManager" );
           createComponent( Executor.class, PREFIX + "executor.AspectAwareExecutor" );
  -        createComponent( ServiceManager.class, PREFIX + "service.DefaultServiceManager" );
  +        createComponent( AntServiceManager.class, PREFIX + "service.DefaultAntServiceManager" );
       }
   
       /**
  @@ -257,8 +257,8 @@
       {
           final String role = roleType.getName();
           final String className = m_parameters.getParameter( role, defaultImpl );
  -        final Component component = createComponent( className, roleType );
  -        m_componentManager.put( role, component );
  +        final Object component = createService( className, roleType );
  +        m_serviceManager.put( role, component );
           m_components.add( component );
       }
   
  @@ -272,7 +272,7 @@
       {
           for( Iterator iterator = m_components.iterator(); iterator.hasNext(); )
           {
  -            final Component component = (Component)iterator.next();
  +            final Object component = iterator.next();
               setupObject( component, m_parameters );
           }
       }
  @@ -359,7 +359,7 @@
        * @return the created object
        * @exception Exception if an error occurs
        */
  -    private Component createComponent( final String component, final Class clazz )
  +    private Object createService( final String component, final Class clazz )
           throws Exception
       {
           try
  @@ -371,13 +371,8 @@
                   final String message = REZ.getString( "bad-type.error", component, clazz.getName() );
                   throw new Exception( message );
               }
  -            if( !( object instanceof Component ) )
  -            {
  -                final String message = REZ.getString( "bad-type.error", component, Component.class.getName() );
  -                throw new Exception( message );
  -            }
   
  -            return (Component)object;
  +            return object;
           }
           catch( final IllegalAccessException iae )
           {
  @@ -408,9 +403,9 @@
       {
           setupLogger( object );
   
  -        if( object instanceof Composable )
  +        if( object instanceof Serviceable )
           {
  -            ( (Composable)object ).compose( m_componentManager );
  +            ( (Serviceable)object ).service( m_serviceManager );
           }
   
           if( object instanceof Parameterizable )
  
  
  
  1.19      +14 -15    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultMasterConverter.java
  
  Index: DefaultMasterConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultMasterConverter.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DefaultMasterConverter.java	21 Feb 2002 10:16:42 -0000	1.18
  +++ DefaultMasterConverter.java	21 Feb 2002 11:06:41 -0000	1.19
  @@ -7,15 +7,14 @@
    */
   package org.apache.myrmidon.components.converter;
   
  +import org.apache.aut.converter.Converter;
  +import org.apache.aut.converter.ConverterException;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -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.logger.AbstractLogEnabled;
  -import org.apache.aut.converter.Converter;
  -import org.apache.aut.converter.ConverterException;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.interfaces.converter.ConverterRegistry;
   import org.apache.myrmidon.interfaces.converter.MasterConverter;
   import org.apache.myrmidon.interfaces.type.TypeException;
  @@ -26,11 +25,11 @@
    * Converter engine to handle converting between types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.18 $ $Date: 2002/02/21 10:16:42 $
  + * @version $Revision: 1.19 $ $Date: 2002/02/21 11:06:41 $
    */
   public class DefaultMasterConverter
       extends AbstractLogEnabled
  -    implements MasterConverter, Composable
  +    implements MasterConverter, Serviceable
   {
       private final static Resources REZ =
           ResourceManager.getPackageResources( DefaultMasterConverter.class );
  @@ -43,15 +42,15 @@
       /**
        * Retrieve relevent services needed to deploy.
        *
  -     * @param componentManager the ComponentManager
  -     * @exception ComponentException if an error occurs
  +     * @param serviceManager the ServiceManager
  +     * @exception ServiceException if an error occurs
        */
  -    public void compose( final ComponentManager componentManager )
  -        throws ComponentException
  +    public void service( final ServiceManager serviceManager )
  +        throws ServiceException
       {
  -        m_registry = (ConverterRegistry)componentManager.lookup( ConverterRegistry.ROLE );
  +        m_registry = (ConverterRegistry)serviceManager.lookup( ConverterRegistry.ROLE );
   
  -        final TypeManager typeManager = (TypeManager)componentManager.lookup( TypeManager.ROLE );
  +        final TypeManager typeManager = (TypeManager)serviceManager.lookup( TypeManager.ROLE );
           try
           {
               m_factory = typeManager.getFactory( Converter.class );
  @@ -59,7 +58,7 @@
           catch( final TypeException te )
           {
               final String message = REZ.getString( "no-converter-factory.error" );
  -            throw new ComponentException( message, te );
  +            throw new ServiceException( message, te );
           }
       }
   
  
  
  
  1.7       +5 -7      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/deployer/Deployer.java
  
  Index: Deployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/deployer/Deployer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Deployer.java	7 Feb 2002 13:01:20 -0000	1.6
  +++ Deployer.java	21 Feb 2002 11:06:41 -0000	1.7
  @@ -8,18 +8,16 @@
   package org.apache.myrmidon.interfaces.deployer;
   
   import java.io.File;
  -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;
   
   /**
    * This class deploys type libraries into a registry.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/02/07 13:01:20 $
  + * @version $Revision: 1.7 $ $Date: 2002/02/21 11:06:41 $
    */
   public interface Deployer
  -    extends Component
   {
       String ROLE = Deployer.class.getName();
   
  @@ -46,6 +44,6 @@
       /**
        * Creates a child deployer.
        */
  -    Deployer createChildDeployer( ComponentManager componentManager )
  -        throws ComponentException;
  +    Deployer createChildDeployer( ServiceManager componentManager )
  +        throws ServiceException;
   }
  
  
  
  1.8       +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java
  
  Index: Embeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Embeddor.java	13 Feb 2002 03:02:54 -0000	1.7
  +++ Embeddor.java	21 Feb 2002 11:06:41 -0000	1.8
  @@ -10,7 +10,6 @@
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Startable;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.parameters.Parameterizable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.myrmidon.interfaces.model.Project;
  @@ -21,10 +20,10 @@
    * Interface through which you embed Myrmidon into applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/02/13 03:02:54 $
  + * @version $Revision: 1.8 $ $Date: 2002/02/21 11:06:41 $
    */
   public interface Embeddor
  -    extends Component, Parameterizable, Initializable, Startable, Disposable
  +    extends Parameterizable, Initializable, Startable, Disposable
   {
       String ROLE = Embeddor.class.getName();
   
  
  
  
  1.4       +6 -6      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/ExecManagerFactory.java
  
  Index: ExecManagerFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/ExecManagerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExecManagerFactory.java	14 Feb 2002 02:03:25 -0000	1.3
  +++ ExecManagerFactory.java	21 Feb 2002 11:06:41 -0000	1.4
  @@ -12,14 +12,14 @@
   import org.apache.aut.nativelib.impl.DefaultExecManager;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.myrmidon.interfaces.service.ServiceException;
  +import org.apache.myrmidon.interfaces.service.AntServiceException;
   import org.apache.myrmidon.interfaces.service.ServiceFactory;
   
   /**
    * A Factory responsible for creating the ExecManager service.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $ $Date: 2002/02/14 02:03:25 $
  + * @version $Revision: 1.4 $ $Date: 2002/02/21 11:06:41 $
    */
   public class ExecManagerFactory
       implements ServiceFactory
  @@ -31,7 +31,7 @@
        * Create the ExecManager Service.
        */
       public Object createService()
  -        throws ServiceException
  +        throws AntServiceException
       {
           final File home = getHomeDirectory();
           try
  @@ -40,7 +40,7 @@
           }
           catch( final ExecException ee )
           {
  -            throw new ServiceException( ee.getMessage(), ee );
  +            throw new AntServiceException( ee.getMessage(), ee );
           }
       }
   
  @@ -48,13 +48,13 @@
        * Utility method to retrieve home directory.
        */
       private static File getHomeDirectory()
  -        throws ServiceException
  +        throws AntServiceException
       {
           final String home = System.getProperty( "myrmidon.home" );
           if( null == home )
           {
               final String message = REZ.getString( "missing-home-dir.error" );
  -            throw new ServiceException( message );
  +            throw new AntServiceException( message );
           }
   
           return new File( home );
  
  
  
  1.3       +4 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/VfsManagerFactory.java
  
  Index: VfsManagerFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/factorys/VfsManagerFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VfsManagerFactory.java	18 Feb 2002 08:38:48 -0000	1.2
  +++ VfsManagerFactory.java	21 Feb 2002 11:06:41 -0000	1.3
  @@ -11,14 +11,14 @@
   import org.apache.aut.vfs.impl.DefaultFileSystemManager;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.myrmidon.interfaces.service.ServiceException;
  +import org.apache.myrmidon.interfaces.service.AntServiceException;
   import org.apache.myrmidon.interfaces.service.ServiceFactory;
   
   /**
    * A factory that creates the {@link FileSystemManager} service.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/02/18 08:38:48 $
  + * @version $Revision: 1.3 $ $Date: 2002/02/21 11:06:41 $
    */
   public class VfsManagerFactory
       implements ServiceFactory
  @@ -30,7 +30,7 @@
        * Create a service that coresponds to this factory.
        */
       public Object createService()
  -        throws ServiceException
  +        throws AntServiceException
       {
           try
           {
  @@ -39,7 +39,7 @@
           catch( Exception e )
           {
               final String message = REZ.getString( "create-vfs-manager.error" );
  -            throw new ServiceException( message );
  +            throw new AntServiceException( message );
           }
       }
   }
  
  
  
  1.7       +1 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor/Executor.java
  
  Index: Executor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/executor/Executor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Executor.java	7 Feb 2002 13:01:20 -0000	1.6
  +++ Executor.java	21 Feb 2002 11:06:41 -0000	1.7
  @@ -7,7 +7,6 @@
    */
   package org.apache.myrmidon.interfaces.executor;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.myrmidon.api.TaskException;
   
  @@ -15,10 +14,9 @@
    * Engine inteface that should be implemented by all tasklet engines.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/02/07 13:01:20 $
  + * @version $Revision: 1.7 $ $Date: 2002/02/21 11:06:41 $
    */
   public interface Executor
  -    extends Component
   {
       String ROLE = Executor.class.getName();
   
  
  
  
  1.5       +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/extensions/ExtensionManager.java
  
  Index: ExtensionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/extensions/ExtensionManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ExtensionManager.java	6 Feb 2002 13:18:52 -0000	1.4
  +++ ExtensionManager.java	21 Feb 2002 11:06:41 -0000	1.5
  @@ -8,16 +8,15 @@
   package org.apache.myrmidon.interfaces.extensions;
   
   import org.apache.avalon.excalibur.extension.PackageRepository;
  -import org.apache.avalon.framework.component.Component;
   
   /**
    * PackageRepository
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.4 $ $Date: 2002/02/06 13:18:52 $
  + * @version $Revision: 1.5 $ $Date: 2002/02/21 11:06:41 $
    */
   public interface ExtensionManager
  -    extends PackageRepository, Component
  +    extends PackageRepository
   {
       String ROLE = ExtensionManager.class.getName();
   }
  
  
  
  1.4       +1 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemManager.java
  
  Index: FileSystemManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileSystemManager.java	15 Feb 2002 07:37:18 -0000	1.3
  +++ FileSystemManager.java	21 Feb 2002 11:06:42 -0000	1.4
  @@ -7,7 +7,6 @@
    */
   package org.apache.aut.vfs;
   
  -import org.apache.avalon.framework.component.Component;
   import java.io.File;
   
   /**
  @@ -53,7 +52,6 @@
    * @author Adam Murdoch
    */
   public interface FileSystemManager
  -    extends Component
   {
       String ROLE = FileSystemManager.class.getName();
   
  @@ -107,5 +105,5 @@
        *          On error parsing the file name.
        *
        */
  -    FileObject resolveFile ( File baseFile, String name ) throws FileSystemException;
  +    FileObject resolveFile( File baseFile, String name ) throws FileSystemException;
   }
  
  
  
  1.8       +1 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/model/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/model/Project.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Project.java	13 Feb 2002 02:47:36 -0000	1.7
  +++ Project.java	21 Feb 2002 11:06:42 -0000	1.8
  @@ -8,17 +8,15 @@
   package org.apache.myrmidon.interfaces.model;
   
   import java.io.File;
  -import org.apache.avalon.framework.component.Component;
   
   /**
    * Abstraction used to interact with projects.
    * Implementations may choose to structure it anyway they choose.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/02/13 02:47:36 $
  + * @version $Revision: 1.8 $ $Date: 2002/02/21 11:06:42 $
    */
   public interface Project
  -    extends Component
   {
       String ROLE = Project.class.getName();
   
  
  
  
  1.8       +2 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/builder/ProjectBuilder.java
  
  Index: ProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/builder/ProjectBuilder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProjectBuilder.java	7 Feb 2002 13:01:20 -0000	1.7
  +++ ProjectBuilder.java	21 Feb 2002 11:06:42 -0000	1.8
  @@ -7,18 +7,16 @@
    */
   package org.apache.myrmidon.interfaces.builder;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.myrmidon.interfaces.model.Project;
   
   /**
    * Interface implemented by components that build projects from sources.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/02/07 13:01:20 $
  + * @version $Revision: 1.8 $ $Date: 2002/02/21 11:06:42 $
    * @ant:role shorthand="project-builder"
    */
   public interface ProjectBuilder
  -    extends Component
   {
       String ROLE = ProjectBuilder.class.getName();
   
  @@ -27,8 +25,7 @@
        *
        * @param source the source
        * @return the constructed Project
  -     * @exception IOException if an error occurs
  -     * @exception AntException if an error occurs
  +     * @exception Exception if an error occurs
        */
       Project build( String source )
           throws Exception;
  
  
  
  1.7       +1 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/role/RoleManager.java
  
  Index: RoleManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/role/RoleManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RoleManager.java	13 Feb 2002 02:43:26 -0000	1.6
  +++ RoleManager.java	21 Feb 2002 11:06:42 -0000	1.7
  @@ -7,8 +7,6 @@
    */
   package org.apache.myrmidon.interfaces.role;
   
  -import org.apache.avalon.framework.component.Component;
  -
   /**
    * Interface to manage roles and mapping to shorthand names.
    *
  @@ -16,10 +14,9 @@
    * @author <a href="mailto:ricardo@apache,org">Ricardo Rocha</a>
    * @author <a href="mailto:giacomo@apache,org">Giacomo Pati</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version CVS $Revision: 1.6 $ $Date: 2002/02/13 02:43:26 $
  + * @version CVS $Revision: 1.7 $ $Date: 2002/02/21 11:06:42 $
    */
   public interface RoleManager
  -    extends Component
   {
       String ROLE = RoleManager.class.getName();
   
  
  
  
  1.7       +1 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/type/TypeManager.java
  
  Index: TypeManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/type/TypeManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TypeManager.java	7 Feb 2002 13:01:20 -0000	1.6
  +++ TypeManager.java	21 Feb 2002 11:06:42 -0000	1.7
  @@ -7,16 +7,13 @@
    */
   package org.apache.myrmidon.interfaces.type;
   
  -import org.apache.avalon.framework.component.Component;
  -
   /**
    * The interface that is used to manage types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/02/07 13:01:20 $
  + * @version $Revision: 1.7 $ $Date: 2002/02/21 11:06:42 $
    */
   public interface TypeManager
  -    extends Component
   {
       String ROLE = TypeManager.class.getName();
   
  
  
  
  1.8       +1 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/workspace/Workspace.java
  
  Index: Workspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/workspace/Workspace.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Workspace.java	13 Feb 2002 03:02:54 -0000	1.7
  +++ Workspace.java	21 Feb 2002 11:06:42 -0000	1.8
  @@ -7,7 +7,6 @@
    */
   package org.apache.myrmidon.interfaces.workspace;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.model.Project;
   import org.apache.myrmidon.listeners.ProjectListener;
  @@ -16,10 +15,9 @@
    * This is the abstraction through which Projects are managed and executed.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/02/13 03:02:54 $
  + * @version $Revision: 1.8 $ $Date: 2002/02/21 11:06:42 $
    */
   public interface Workspace
  -    extends Component
   {
       String ROLE = Workspace.class.getName();
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message