avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/assembly/src/xdocs appliance.xml
Date Thu, 09 Jan 2003 15:08:11 GMT
mcconnell    2003/01/09 07:08:11

  Modified:    assembly/src/java/org/apache/avalon/assembly/appliance
                        Appliance.java ApplianceContext.java
                        ContextBuilder.java DefaultAppliance.java
                        DefaultApplianceContext.java
               assembly/src/java/org/apache/avalon/assembly/engine
                        DefaultRepositoryManager.java
                        EngineClassLoader.java
               assembly/src/java/org/apache/avalon/assembly/engine/profile
                        ProfileManager.java
               assembly/src/java/org/apache/avalon/assembly/engine/service
                        ServiceRepository.java
               assembly/src/java/org/apache/avalon/assembly/engine/type
                        TypeManager.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle
                        DefaultAssemblyService.java
                        DefaultDeploymentService.java
                        DeploymentService.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle/initialization
                        ExtendedInitializationService.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle/logging
                        DefaultLoggingService.java
               assembly/src/java/org/apache/avalon/assembly/lifestyle
                        AbstractLifestyleHandler.java
                        DefaultLifestyleService.java LifestyleService.java
                        PooledLifestyleHandler.java
                        SingletonLifestyleHandler.java
                        TransientLifestyleHandler.java
               assembly/src/java/org/apache/avalon/assembly/locator
                        Reclaimable.java Resolvable.java
               assembly/src/java/org/apache/avalon/assembly/logging
                        DefaultLoggingManager.java
               assembly/src/test/org/apache/avalon/assembly
                        TestCaseBase.java
               assembly/src/test/org/apache/avalon/assembly/engine
                        EngineTestCase.java
               assembly/src/xdocs appliance.xml
  Log:
  Moveing codebase from Context/ServiceManager mix to Locator based implementation.
  
  Revision  Changes    Path
  1.20      +2 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/Appliance.java
  
  Index: Appliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/Appliance.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Appliance.java	9 Jan 2003 11:25:26 -0000	1.19
  +++ Appliance.java	9 Jan 2003 15:08:09 -0000	1.20
  @@ -83,7 +83,7 @@
      /**
       * Meta-info attribute name under which an alternative appliance class may be declared.
       */
  -    static final String APPLIANCE_CLASS_ATTRIBUTE_NAME = 
  +    static final String APPLIANCE_CLASS_KEY = 
         "urn:assembly:appliance.class";
   
      /**
  
  
  
  1.9       +6 -13     avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ApplianceContext.java
  
  Index: ApplianceContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ApplianceContext.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ApplianceContext.java	9 Jan 2003 11:25:26 -0000	1.8
  +++ ApplianceContext.java	9 Jan 2003 15:08:09 -0000	1.9
  @@ -55,24 +55,17 @@
   import java.util.ArrayList;
   
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.parameters.Parameters;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.context.Contextualizable;
  -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.logger.Logger;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.parameters.Parameters;
   
   import org.apache.avalon.assembly.engine.EngineClassLoader;
   import org.apache.avalon.assembly.lifestyle.LifestyleException;
   import org.apache.avalon.assembly.lifestyle.LifestyleService;
   import org.apache.avalon.assembly.lifestyle.LifestyleHandler;
  +import org.apache.avalon.assembly.locator.Locator;
   import org.apache.avalon.meta.info.Type;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
  @@ -91,7 +84,7 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public interface ApplianceContext extends Context
  +public interface ApplianceContext extends Locator
   {
       //=====================================================================
       // static
  
  
  
  1.3       +1 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ContextBuilder.java
  
  Index: ContextBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ContextBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContextBuilder.java	23 Dec 2002 00:13:33 -0000	1.2
  +++ ContextBuilder.java	9 Jan 2003 15:08:09 -0000	1.3
  @@ -55,7 +55,6 @@
   import java.util.HashMap;
   
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.context.ContextException;
  
  
  
  1.22      +10 -15    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java
  
  Index: DefaultAppliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DefaultAppliance.java	9 Jan 2003 11:25:26 -0000	1.21
  +++ DefaultAppliance.java	9 Jan 2003 15:08:09 -0000	1.22
  @@ -75,17 +75,17 @@
   import org.apache.avalon.assembly.lifestyle.LifestyleHandler;
   import org.apache.avalon.assembly.lifecycle.AssemblyService;
   import org.apache.avalon.assembly.lifecycle.AssemblyException;
  +import org.apache.avalon.assembly.locator.Locator;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.meta.info.ContextDescriptor;
   import org.apache.avalon.meta.info.DependencyDescriptor;
  -import org.apache.avalon.meta.info.Type;
  -import org.apache.avalon.meta.info.StageDescriptor;
   import org.apache.avalon.meta.info.LoggerDescriptor;
  -import org.apache.avalon.meta.info.ContextDescriptor;
  -import org.apache.avalon.meta.model.Profile;
  -import org.apache.avalon.meta.model.LoggingDirective;
  +import org.apache.avalon.meta.info.StageDescriptor;
  +import org.apache.avalon.meta.info.Type;
   import org.apache.avalon.meta.model.ContextDirective;
  +import org.apache.avalon.meta.model.LoggingDirective;
  +import org.apache.avalon.meta.model.Profile;
   
  -import org.apache.avalon.assembly.locator.Locator;
  -import org.apache.avalon.assembly.locator.Contextualizable;
   
   /**
    * Default implementation of an appliance that supports the association of 
  @@ -127,7 +127,7 @@
       /**
        * The system context.
        */
  -    private Context m_system;
  +    private Locator m_system;
   
       /**
        * The derived component context.
  @@ -166,11 +166,6 @@
       private String m_path;
   
      /**
  -    * The logging channel.
  -    */
  -    //private Logger m_logger;
  -
  -   /**
       * The appliance URL.
       */
       private URL m_url;
  @@ -217,7 +212,7 @@
           m_assembly = (AssemblyService) context.get( "urn:assembly:assembly.service" );
           m_lifestyle = (LifestyleService) context.get( "urn:assembly:lifestyle.service" );
           m_applianceContext = (ApplianceContext) context.get( "urn:assembly:appliance.context" );
  -        m_system = (Context) context.get( "urn:assembly:appliance.system" );
  +        m_system = (Locator) context.get( "urn:assembly:appliance.system" );
       }
   
       //=====================================================================
  
  
  
  1.6       +5 -5      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceContext.java
  
  Index: DefaultApplianceContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultApplianceContext.java	9 Jan 2003 11:25:26 -0000	1.5
  +++ DefaultApplianceContext.java	9 Jan 2003 15:08:09 -0000	1.6
  @@ -64,7 +64,6 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.service.ServiceException;
  @@ -73,6 +72,7 @@
   import org.apache.avalon.assembly.lifestyle.LifestyleException;
   import org.apache.avalon.assembly.lifestyle.LifestyleService;
   import org.apache.avalon.assembly.lifestyle.LifestyleHandler;
  +import org.apache.avalon.assembly.locator.DefaultLocator;
   import org.apache.avalon.meta.info.Type;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
  @@ -92,7 +92,7 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public class DefaultApplianceContext extends DefaultContext implements ApplianceContext
  +public class DefaultApplianceContext extends DefaultLocator implements ApplianceContext
   {
       //=====================================================================
       // state
  @@ -180,7 +180,7 @@
           {
               throw new NullPointerException( "profile" );
           }
  -        m_map = getContextData();
  +        m_map = getData();
           m_profile = profile;
       }
   
  @@ -212,7 +212,7 @@
       {
           if( m_classname == null )
           {
  -            return getType().getInfo().getAttribute( Appliance.APPLIANCE_CLASS_ATTRIBUTE_NAME );
  +            return getType().getInfo().getAttribute( Appliance.APPLIANCE_CLASS_KEY );
           }
           else
           {
  
  
  
  1.8       +1 -5      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultRepositoryManager.java
  
  Index: DefaultRepositoryManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultRepositoryManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultRepositoryManager.java	8 Jan 2003 20:42:22 -0000	1.7
  +++ DefaultRepositoryManager.java	9 Jan 2003 15:08:10 -0000	1.8
  @@ -86,10 +86,6 @@
   import org.apache.avalon.excalibur.packagemanager.impl.DefaultExtensionManager;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  
  
  
  1.24      +21 -32    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java
  
  Index: EngineClassLoader.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- EngineClassLoader.java	9 Jan 2003 11:25:26 -0000	1.23
  +++ EngineClassLoader.java	9 Jan 2003 15:08:10 -0000	1.24
  @@ -81,6 +81,7 @@
   import org.apache.avalon.assembly.engine.model.FilesetDescriptor;
   import org.apache.avalon.assembly.engine.model.IncludeDescriptor;
   import org.apache.avalon.assembly.engine.model.ClasspathDescriptor;
  +import org.apache.avalon.assembly.locator.Contextualizable;
   import org.apache.avalon.assembly.logging.LoggingDescriptor;
   import org.apache.avalon.assembly.logging.DefaultLoggingManager;
   import org.apache.avalon.assembly.logging.LoggingManager;
  @@ -97,7 +98,6 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
  @@ -166,7 +166,7 @@
       * will be propergated by this engine to compoents under it 
       * supervision.
       */
  -    private Context m_context;
  +    private Locator m_context;
   
      /**
       * The appliance manager for this engine is a repository of the of the 
  @@ -311,64 +311,52 @@
       * established by this service.
       * @param context the runtime context
       */
  -    public void contextualize( Context context ) throws ContextException
  +    public void contextualize( Locator context ) throws ContextException
       {
           m_context = context;
   
  -        try
  +        if( context.hasEntry( "urn:assembly:system-map" ) )
           {
               m_map = (Map) context.get( "urn:assembly:system-map" );
           }
  -        catch( ContextException ce )
  -        {
  -            // ignore
  -        }
   
  -        try
  +        if( context.hasEntry( "urn:assembly:engine.extensions" ) )
           {
               m_descriptor = (LibraryDescriptor)context.get( "urn:assembly:engine.extensions" );
           }
  -        catch( ContextException e )
  +        else
           {
               m_descriptor = new LibraryDescriptor();
           }
   
  -        try
  +        if( context.hasEntry( "urn:assembly:engine.classpath" ) )
           {
               m_classpath = (ClasspathDescriptor)context.get( "urn:assembly:engine.classpath" );
           }
  -        catch( ContextException e )
  +        else
           {
               m_classpath = new ClasspathDescriptor();
           }
   
  -        try
  +        if( context.hasEntry( "urn:assembly:home" ) )
           {
               m_home = (File)context.get( "urn:assembly:home" );
           }
  -        catch( ContextException e )
  +        else
           {
               m_home = new File( System.getProperty( "user.dir" ) );
           }
   
  -        try
  +        if( context.hasEntry( "urn:assembly:engine.bootstrap" ) )
           {
               m_bootstrap = "true".equals( context.get( "urn:assembly:engine.bootstrap" ) );
           }
  -        catch( ContextException ce )
  -        {
  -            // use default value
  -        }
   
  -        try
  +        if( context.hasEntry( "urn:assembly:logging.manager" ) )
           {
               String key = "urn:assembly:logging.manager";
               m_logging = (LoggingManager) context.get( key );
           }
  -        catch( ContextException ce )
  -        {
  -            // optional
  -        }
       }
   
       //==============================================================
  @@ -396,7 +384,7 @@
               getLogger().debug( REZ.getString( "initialization" ) );
           }
   
  -        createRepositoryManager();
  +        m_repository = createRepositoryManager();
           m_factory = DefaultApplianceFactory.createApplianceFactory( 
              this, getLogger(), getSystemContext() );
           m_appliances = createApplianceManager( m_facilities );
  @@ -971,21 +959,22 @@
           }
       }
   
  -    private void createRepositoryManager() throws Exception
  +    private DefaultRepositoryManager createRepositoryManager() throws Exception
       {
           ClassLoader parent = getParent();
  +        DefaultRepositoryManager manager;
           if(( parent != null ) && ( parent instanceof EngineClassLoader ))
           {
  -            m_repository = 
  -             new DefaultRepositoryManager( 
  +             manager = new DefaultRepositoryManager( 
                  this, ((EngineClassLoader)parent).getRepository() );
           }
           else
           {
  -            m_repository = new DefaultRepositoryManager( this );
  +            manager = new DefaultRepositoryManager( this );
           }
  -        m_repository.enableLogging( getLogger() );
  -        m_repository.initialize();
  +        manager.enableLogging( getLogger() );
  +        manager.initialize();
  +        return manager;
       }
   
       private ApplianceManager createApplianceManager( Map facilities ) 
  
  
  
  1.2       +1 -4      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/profile/ProfileManager.java
  
  Index: ProfileManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/profile/ProfileManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProfileManager.java	23 Dec 2002 00:13:34 -0000	1.1
  +++ ProfileManager.java	9 Jan 2003 15:08:10 -0000	1.2
  @@ -58,9 +58,6 @@
   
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.assembly.engine.type.TypeManager;
   import org.apache.avalon.assembly.engine.type.UnknownTypeException;
  
  
  
  1.2       +1 -4      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/service/ServiceRepository.java
  
  Index: ServiceRepository.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/service/ServiceRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceRepository.java	27 Dec 2002 16:11:42 -0000	1.1
  +++ ServiceRepository.java	9 Jan 2003 15:08:10 -0000	1.2
  @@ -56,9 +56,6 @@
   
   import org.apache.avalon.framework.Version;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.meta.info.Service;
   import org.apache.avalon.meta.info.builder.ServiceBuilder;
  
  
  
  1.2       +1 -5      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/type/TypeManager.java
  
  Index: TypeManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/type/TypeManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeManager.java	23 Dec 2002 00:13:34 -0000	1.1
  +++ TypeManager.java	9 Jan 2003 15:08:10 -0000	1.2
  @@ -56,10 +56,6 @@
   import java.util.ArrayList;
   
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
  -import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.meta.info.Type;
   import org.apache.avalon.meta.info.builder.TypeBuilder;
   import org.apache.avalon.meta.info.ReferenceDescriptor;
  
  
  
  1.5       +21 -36    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultAssemblyService.java
  
  Index: DefaultAssemblyService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultAssemblyService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultAssemblyService.java	9 Jan 2003 03:58:26 -0000	1.4
  +++ DefaultAssemblyService.java	9 Jan 2003 15:08:10 -0000	1.5
  @@ -55,17 +55,15 @@
   import java.util.Map;
   
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.service.Serviceable;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.engine.Engine;
   import org.apache.avalon.assembly.appliance.DependencyGraph;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.Locator;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
   import org.apache.avalon.meta.info.ReferenceDescriptor;
  @@ -79,7 +77,7 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public class DefaultAssemblyService extends AbstractLogEnabled implements AssemblyService, Contextualizable, Serviceable, Initializable
  +public class DefaultAssemblyService extends AbstractLogEnabled implements AssemblyService, Contextualizable, Initializable
   {
       //==============================================================
       // static
  @@ -91,7 +89,7 @@
       // state
       //==============================================================
   
  -    private ServiceManager m_manager;
  +    private Locator m_context;
   
       private boolean m_initialized = false;
   
  @@ -118,33 +116,25 @@
       *     <td>org.apache.avalon.assembly.appliance.DepedendencyGraph</td>
       *     <td>The depedency graph.</td> 
       *   </tr>
  +    *   <tr>
  +    *     <td>urn:assembly:engine.classloader</td>
  +    *     <td>org.apache.avalon.assembly.engine.EngineClassLoader</td>
  +    *     <td>The component engine.</td> 
  +    *   </tr>
       * </table>
       * @param context the runtime context
       */
  -    public void contextualize( Context context ) throws ContextException
  +    public void contextualize( Locator context ) throws ContextException
       {
           m_map = (DependencyGraph) context.get( "urn:assembly:dependency-map" );
  -    }
  -
  -    //==============================================================
  -    // Serviceable
  -    //==============================================================
  -
  -   /**
  -    * <p>Supply of container based services that may be used by the 
  -    * assembly service as supplimentary resources.</p>
  -    * @param manager the service manager
  -    */
  -    public void service( ServiceManager manager ) throws ServiceException
  -    {
  -         if( manager.hasService( ENGINE_KEY ) )
  -         {
  -             m_manager = manager;
  -         }
  -         else
  -         {
  -             throw new ServiceException( ENGINE_KEY );
  -         }
  +        if( context.hasEntry( ENGINE_KEY ) )
  +        {
  +            m_context = context;
  +        }
  +        else
  +        {
  +            throw new ContextException( ENGINE_KEY );
  +        }
       }
   
       //==============================================================
  @@ -169,11 +159,6 @@
           {
               throw new IllegalStateException("contextaulize");
           }
  -        if( m_manager == null )
  -        {
  -            throw new IllegalStateException("service");
  -        }
  -
           m_initialized = true;
       }
   
  @@ -234,9 +219,9 @@
               }
               try
               {
  -                m_engine = (Engine) m_manager.lookup( ENGINE_KEY );
  +                m_engine = (Engine) m_context.get( ENGINE_KEY );
               }
  -            catch( ServiceException e )
  +            catch( ContextException e )
               {
                   throw new IllegalStateException("engine");
               }
  
  
  
  1.12      +60 -114   avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultDeploymentService.java
  
  Index: DefaultDeploymentService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultDeploymentService.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DefaultDeploymentService.java	21 Dec 2002 09:26:34 -0000	1.11
  +++ DefaultDeploymentService.java	9 Jan 2003 15:08:10 -0000	1.12
  @@ -54,9 +54,7 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.DefaultServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
  @@ -86,6 +84,9 @@
   import org.apache.avalon.assembly.lifecycle.disposal.DefaultDisposalService;
   import org.apache.avalon.assembly.lifecycle.disposal.ExtendedDisposalService;
   import org.apache.avalon.assembly.logging.LoggingManager;
  +import org.apache.avalon.assembly.locator.Locator;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.DefaultLocator;
   
   /**
    * A deployment service is responsible for the deployment of a component 
  @@ -94,14 +95,13 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public class DefaultDeploymentService extends AbstractLogEnabled implements Configurable, Serviceable, Contextualizable, Initializable, DeploymentService
  +public class DefaultDeploymentService extends AbstractLogEnabled implements Contextualizable, Initializable, DeploymentService
   {
       //==============================================================
       // state
       //==============================================================
   
  -    private Context m_context;
  -    private ServiceManager m_manager;
  +    private Locator m_context;
       private LoggingService m_logging;
       private ConfigurationService m_configuration;
       private ContextualizationService m_contextualization;
  @@ -115,24 +115,6 @@
       private boolean m_extensionEnabled = true;
   
       //==============================================================
  -    // Configurable
  -    //==============================================================
  -
  -   /**
  -    * Supply of the static configuration for the deployment service.
  -    * @param config the static configuration
  -    */
  -    public void configure( Configuration config ) throws ConfigurationException
  -    {
  -        if( config == null )
  -        {
  -            throw new NullPointerException( "config" );
  -        }
  -        m_extensionEnabled = 
  -          config.getChild("extensions").getAttributeAsBoolean( "enabled", true );
  -    }
  -
  -    //==============================================================
       // Contextualizable
       //==============================================================
   
  @@ -142,7 +124,7 @@
       * established by this service.
       * @param context the runtime context
       */
  -    public void contextualize( Context context ) throws ContextException
  +    public void contextualize( Locator context ) throws ContextException
       {
           if( context == null )
           {
  @@ -152,131 +134,92 @@
       }
   
       //==============================================================
  -    // Serviceable
  +    // Initializable
       //==============================================================
   
  -   /**
  -    * <p>Application of a supporting service to the deployment service.</p>
  -    * <table>
  -    *   <tr>
  -    *     <td>key</td><td>type</td><td>description</td>
  -    *   </tr>
  -    *   <tr>
  -    *     <td>urn:assembly:lifecycle.logging</td>
  -    *     <td>{@link org.apache.avalon.assembly.lifecycle.logging.LoggingService}</td>
  -    *     <td>The logging service to use for the creation of auxiliary logging channels.</td> 
  -    *   </tr>
  -    * </table>
  -    * @param context the runtime context
  -    */
  -    public void service( ServiceManager manager ) throws ServiceException
  +    public void initialize() throws Exception
       {
  -        if( manager == null )
  -        {
  -            throw new NullPointerException( "manager" );
  -        }
  -
  -        final String classloaderkey = "urn:assembly:engine.classloader";
  -        if( !manager.hasService( classloaderkey ) )
  +        if( m_context  == null )
           {
  -            throw new ServiceException( classloaderkey );
  +            throw new IllegalStateException("context");
           }
   
  -        m_manager = manager;
  -
           String key = "urn:assembly:lifecycle.logging";
  -        if( manager.hasService( key ) )
  +        if( m_context.hasEntry( key ) )
           {
  -            m_logging = (LoggingService) manager.lookup( key );
  +            m_logging = (LoggingService) m_context.get( key );
           }
  -
  -        key = "urn:assembly:lifecycle.configuration"; 
  -        if( manager.hasService( key ) )
  +        else
           {
  -            m_configuration = (ConfigurationService) manager.lookup( key );
  +            m_logging = makeLoggingService();
           }
   
  -        key = "urn:assembly:lifecycle.parameters"; 
  -        if( manager.hasService( key ) )
  +        key = "urn:assembly:lifecycle.configuration"; 
  +        if( m_context.hasEntry( key ) )
           {
  -            m_parameters = (ParameterizationService) manager.lookup( key );
  +            m_configuration = (ConfigurationService) m_context.get( key );
           }
  -
  -        key = "urn:assembly:lifecycle.context"; 
  -        if( manager.hasService( key ) )
  +        else
           {
  -            m_contextualization = (ContextualizationService) manager.lookup( key );
  +            m_configuration = makeConfigurationService();
           }
   
  -        key = "urn:assembly:lifecycle.composition";
  -        if( manager.hasService( key ) )
  +        key = "urn:assembly:lifecycle.parameters"; 
  +        if( m_context.hasEntry( key ) )
           {
  -            m_composition = (CompositionService) manager.lookup( key );
  +            m_parameters = (ParameterizationService) m_context.get( key );
           }
  -
  -        key = "urn:assembly:lifecycle.initialization"; 
  -        if( manager.hasService( key ) )
  +        else
           {
  -            m_initialization = (InitializationService) manager.lookup( key );
  +            m_parameters = makeParameterizationService();
           }
   
  -        key = "urn:assembly:lifecycle.startup"; 
  -        if( manager.hasService( key ) )
  +        key = "urn:assembly:lifecycle.context"; 
  +        if( m_context.hasEntry( key ) )
           {
  -            m_startup = (StartupService) manager.lookup( key );
  +            m_contextualization = (ContextualizationService) m_context.get( key );
           }
  -
  -        key = "urn:assembly:lifecycle.disposal";
  -        if( manager.hasService( key ) )
  +        else
           {
  -            m_disposal = (DisposalService) manager.lookup( key );
  +            m_contextualization = makeContextualizationService();
           }
  -    }
  -
  -    //==============================================================
  -    // Initializable
  -    //==============================================================
   
  -    public void initialize() throws Exception
  -    {
  -        if( m_context  == null )
  +        key = "urn:assembly:lifecycle.composition"; 
  +        if( m_context.hasEntry( key ) )
           {
  -            throw new IllegalStateException("context");
  +            m_composition = (CompositionService) m_context.get( key );
           }
  -        if( m_manager  == null )
  +        else
           {
  -            throw new IllegalStateException("service");
  +            m_composition = makeCompositionService();
           }
   
  -        if( m_logging == null )
  -        {
  -            m_logging = makeLoggingService();
  -        }
  -        if( m_configuration == null )
  -        {
  -            m_configuration = makeConfigurationService();
  -        }
  -        if( m_parameters == null )
  +        key = "urn:assembly:lifecycle.initialization"; 
  +        if( m_context.hasEntry( key ) )
           {
  -            m_parameters = makeParameterizationService();
  +            m_initialization = (InitializationService) m_context.get( key );
           }
  -        if( m_contextualization == null )
  +        else
           {
  -            m_contextualization = makeContextualizationService();
  +            m_initialization = makeInitializationService();
           }
  -        if( m_composition == null )
  +
  +        key = "urn:assembly:lifecycle.startup"; 
  +        if( m_context.hasEntry( key ) )
           {
  -            m_composition = makeCompositionService();
  +            m_startup = (StartupService) m_context.get( key );
           }
  -        if( m_initialization == null )
  +        else
           {
  -            m_initialization = makeInitializationService();
  +            m_startup = makeStartupService();
           }
  -        if( m_startup == null )
  +
  +        key = "urn:assembly:lifecycle.disposal"; 
  +        if( m_context.hasEntry( key ) )
           {
  -            m_startup = makeStartupService();
  +            m_disposal = (DisposalService) m_context.get( key );
           }
  -        if( m_disposal == null )
  +        else
           {
               m_disposal = makeDisposalService();
           }
  @@ -297,7 +240,7 @@
       * @param context the containment context
       * @return the deployed component
       */
  -    public Object deploy( Appliance appliance, ClassLoader classloader ) 
  +    public Object deploy( Appliance appliance, ClassLoader classloader )
         throws DeploymentException
       {
           if( !m_initialized )
  @@ -359,7 +302,6 @@
               m_composition.service( appliance, instance );
               m_initialization.initialize( appliance, instance );
               m_startup.start( appliance, instance );
  -
               return instance;
           }
           catch( Throwable e )
  @@ -409,6 +351,10 @@
           m_disposal.dispose( appliance, instance );
       }
   
  +    //----------------------------------------------------------------------------
  +    // internal services
  +    //----------------------------------------------------------------------------
  +
       private LoggingService makeLoggingService() throws DeploymentException
       {
           try
  @@ -416,10 +362,10 @@
               DefaultLoggingService service = new DefaultLoggingService();
               service.enableLogging( getLogger().getChildLogger( "logging" ) );
               LoggingManager logging = 
  -              (LoggingManager) m_manager.lookup( "urn:assembly:logging.manager" );
  -            DefaultServiceManager manager = new DefaultServiceManager();
  -            manager.put( "urn:assembly:logging.manager", logging );
  -            service.service( manager );
  +              (LoggingManager) m_context.get( "urn:assembly:logging.manager" );
  +            DefaultLocator locator = new DefaultLocator();
  +            locator.put( "urn:assembly:logging.manager", logging );
  +            service.contextualize( locator );
               service.initialize();
               return service;
           }
  
  
  
  1.5       +1 -10     avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DeploymentService.java
  
  Index: DeploymentService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DeploymentService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeploymentService.java	21 Dec 2002 09:26:34 -0000	1.4
  +++ DeploymentService.java	9 Jan 2003 15:08:10 -0000	1.5
  @@ -50,15 +50,6 @@
   
   package org.apache.avalon.assembly.lifecycle;
   
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
  -import org.apache.avalon.framework.logger.Logger;
  -
   import org.apache.avalon.assembly.appliance.Appliance;
   
   /**
  
  
  
  1.11      +1 -4      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/initialization/ExtendedInitializationService.java
  
  Index: ExtendedInitializationService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/initialization/ExtendedInitializationService.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ExtendedInitializationService.java	21 Dec 2002 09:26:34 -0000	1.10
  +++ ExtendedInitializationService.java	9 Jan 2003 15:08:10 -0000	1.11
  @@ -56,9 +56,6 @@
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.lifecycle.DeploymentException;
   import org.apache.avalon.assembly.engine.Engine;
  
  
  
  1.6       +12 -12    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/logging/DefaultLoggingService.java
  
  Index: DefaultLoggingService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/logging/DefaultLoggingService.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultLoggingService.java	21 Dec 2002 03:28:38 -0000	1.5
  +++ DefaultLoggingService.java	9 Jan 2003 15:08:10 -0000	1.6
  @@ -56,11 +56,11 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.Serviceable;
  -import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.logging.LoggingManager;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.Locator;
   import org.apache.avalon.meta.info.LoggerDescriptor;
   import org.apache.avalon.meta.model.Profile;
   import org.apache.avalon.meta.model.LoggingDirective;
  @@ -72,7 +72,7 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public class DefaultLoggingService extends AbstractLogEnabled implements Serviceable, Initializable, LoggingService
  +public class DefaultLoggingService extends AbstractLogEnabled implements Contextualizable, Initializable, LoggingService
   {
       //==============================================================
       // state
  @@ -81,18 +81,18 @@
       private LoggingManager m_manager;
   
       //==============================================================
  -    // Serviceable
  +    // Contextualizable
       //==============================================================
   
      /**
       * <p>Application of a logging manager to this service.</p>
  -    * @param manager the service manager
  -    * @exception ServiceException if the logging manager is included
  -    *    with the supplied manager
  +    * @param context the service locator
  +    * @exception ContextException if the logging manager is not included
  +    *    with the supplied context
       */
  -    public void service( ServiceManager manager ) throws ServiceException
  +    public void contextualize( Locator context ) throws ContextException
       {
  -        m_manager = (LoggingManager) manager.lookup( "urn:assembly:logging.manager" );
  +        m_manager = (LoggingManager) context.get( "urn:assembly:logging.manager" );
       }
   
       //==============================================================
  @@ -108,7 +108,7 @@
       {
           if( m_manager == null )
           {
  -            throw new IllegalStateException("service");
  +            throw new IllegalStateException("context");
           }
       }
   
  
  
  
  1.16      +8 -34     avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/AbstractLifestyleHandler.java
  
  Index: AbstractLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/AbstractLifestyleHandler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- AbstractLifestyleHandler.java	23 Dec 2002 00:13:34 -0000	1.15
  +++ AbstractLifestyleHandler.java	9 Jan 2003 15:08:10 -0000	1.16
  @@ -57,7 +57,6 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.Serviceable;
  @@ -70,6 +69,8 @@
   import org.apache.avalon.meta.model.Profile;
   import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.lifecycle.DeploymentService;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.Locator;
   import org.apache.avalon.lifecycle.Accessor;
   
   /**
  @@ -79,7 +80,7 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public abstract class AbstractLifestyleHandler extends AbstractLogEnabled implements Serviceable, Initializable, Disposable, LifestyleHandler
  +public abstract class AbstractLifestyleHandler extends AbstractLogEnabled implements Contextualizable, Initializable, Disposable, LifestyleHandler
   {
       //==============================================================
       // state
  @@ -105,7 +106,7 @@
      /**
       * The deplyment context.
       */
  -    private Context m_context;
  +    private Locator m_context;
   
      /**
       * The implementation class.
  @@ -134,13 +135,14 @@
       * </table>
       * @param context the runtime context
       */
  -    public void contextualize( Context context ) throws ContextException
  +    public void contextualize( Locator context ) throws ContextException
       {
           m_classloader = (ClassLoader) context.get( "urn:avalon:classloader" );
           m_appliance = (Appliance) context.get( "urn:assembly:appliance.target" );
  +        m_deployment = (DeploymentService) context.get( "urn:assembly:lifecycle.deployment" );
           try
           {
  -            m_context = (Context) context.get( "urn:assembly:deployment.context" );
  +            m_context = (Locator) context.get( "urn:assembly:deployment.context" );
           }
           catch( ContextException ce )
           {
  @@ -149,30 +151,6 @@
       }
   
       //==============================================================
  -    // Serviceable
  -    //==============================================================
  -
  -   /**
  -    * <p>Application of a supporting service to the handler.</p>
  -    * <table>
  -    *   <tr>
  -    *     <td>key</td><td>type</td><td>description</td>
  -    *   </tr>
  -    *   <tr>
  -    *     <td>urn:assembly:lifestyle.deployment</td>
  -    *     <td>{@link org.apache.avalon.assembly.lifecycle.DeploymentService}</td>
  -    *     <td>The deplyment service that will handle deployment and decommissioning
  -    *         of instances derived from the appliance.</td> 
  -    *   </tr>
  -    * </table>
  -    * @param context the runtime context
  -    */
  -    public void service( ServiceManager manager ) throws ServiceException
  -    {
  -        m_deployment = (DeploymentService) manager.lookup( "urn:assembly:lifecycle.deployment" );
  -    }
  -
  -    //==============================================================
       // Initializable
       //==============================================================
   
  @@ -192,10 +170,6 @@
           if( m_appliance == null )
           {
               throw new LifestyleException("context");
  -        }
  -        if( m_deployment == null )
  -        {
  -            throw new LifestyleException("service");
           }
       }
   
  
  
  
  1.6       +20 -66    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/DefaultLifestyleService.java
  
  Index: DefaultLifestyleService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/DefaultLifestyleService.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultLifestyleService.java	20 Dec 2002 11:54:29 -0000	1.5
  +++ DefaultLifestyleService.java	9 Jan 2003 15:08:10 -0000	1.6
  @@ -59,7 +59,6 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.service.ServiceManager;
  @@ -70,6 +69,9 @@
   import org.apache.avalon.assembly.engine.Engine;
   import org.apache.avalon.assembly.lifecycle.DeploymentService;
   import org.apache.avalon.assembly.lifecycle.DefaultDeploymentService;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.DefaultLocator;
  +import org.apache.avalon.assembly.locator.Locator;
   
   /**
    * A lifestyle service provides support for the creation of a lifestyle 
  @@ -78,22 +80,22 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public class DefaultLifestyleService extends AbstractLogEnabled implements LifestyleService, Serviceable, Initializable
  +public class DefaultLifestyleService extends AbstractLogEnabled implements LifestyleService, Contextualizable, Initializable
   {
       //==============================================================
       // state
       //==============================================================
   
       /**
  -     * The service manager containing the deployment service to assign 
  +     * The context containing the deployment service to assign 
        * to the lifestyle handler.
        */
  -    private ServiceManager m_manager;
  +    private Locator m_context;
   
       /**
        * The system context.
        */
  -    private Context m_context;
  +    private Locator m_system;
   
      /**
       * Flag holding the initialized state of the service.
  @@ -103,78 +105,37 @@
      /**
       * The supplied static configuration.
       */
  -    private Configuration m_config;
  -
  -   /**
  -    * The supplied static configuration.
  -    */
       private DeploymentService m_deployment;
   
       //==============================================================
  -    // Configurable
  -    //==============================================================
  -
  -   /**
  -    * Supply of the static configuration for the deployment service.
  -    * @param config the static configuration
  -    */
  -    public void configure( Configuration config ) throws ConfigurationException
  -    {
  -        if( config == null )
  -        {
  -            throw new NullPointerException( "config" );
  -        }
  -        m_config = config;
  -    }
  -
  -    //==============================================================
  -    // Serviceable
  +    // Contextualizable
       //==============================================================
   
      /**
       * Supply of supporting services to this componet by its manager.
       * This includes a deployment service.
       */
  -    public void service( ServiceManager manager ) throws ServiceException
  +    public void contextualize( Locator context ) throws ContextException
       {
  -        if( manager == null )
  +        if( context == null )
           {
  -            throw new NullPointerException( "manager" );
  +            throw new NullPointerException( "context" );
           }
   
  -        final String engineKey = "urn:assembly:engine.classloader";
  -        if( !manager.hasService( engineKey ) )
  +        final String key = "urn:assembly:engine.classloader";
  +        if( !context.hasEntry( key ) )
           {
  -            throw new ServiceException( engineKey );
  +            throw new ContextException( key );
           }
   
  -        m_manager = manager;
  +        m_context = context;
   
           m_deployment = 
  -         (DeploymentService) manager.lookup( "urn:assembly:lifecycle.deployment" );
  +         (DeploymentService) context.get( "urn:assembly:lifecycle.deployment" );
   
       }
   
       //==============================================================
  -    // Contextualizable
  -    //==============================================================
  -
  -   /**
  -    * <p>Application of a runtime context to the lifestyle service.
  -    * The context value will be passed directly to lifestyle handlers 
  -    * established by this service.
  -    * @param context the runtime context
  -    */
  -    public void contextualize( Context context ) throws ContextException
  -    {
  -        if( context == null )
  -        {
  -            throw new NullPointerException( "context" );
  -        }
  -        m_context = context;
  -    }
  -
  -    //==============================================================
       // Initializable
       //==============================================================
   
  @@ -188,11 +149,6 @@
           {
               throw new IllegalStateException("context");
           }
  -        if( m_deployment == null )
  -        {
  -            throw new IllegalStateException("manager");
  -        }
  -
           m_initialized = true;
       }
   
  @@ -207,7 +163,7 @@
       * @param context a deployment context
       */
       public LifestyleHandler createHandler( 
  -      Appliance appliance, ClassLoader classloader, Context deploymentContext )
  +      Appliance appliance, ClassLoader classloader, Locator deploymentContext )
       {
           if( !m_initialized )
           {
  @@ -227,13 +183,14 @@
           // create the deployment context to be supplied to the handler
           //
   
  -        DefaultContext context = new DefaultContext( m_context );
  +        DefaultLocator context = new DefaultLocator( m_context );
           if( deploymentContext != null )
           {
               context.put( "urn:assembly:deployment.context", deploymentContext );
           }
           context.put( "urn:assembly:appliance.target", appliance );
           context.put( "urn:avalon:classloader", classloader );
  +        context.put(  "urn:assembly:lifecycle.deployment", m_deployment );
           context.makeReadOnly();
   
           //
  @@ -252,7 +209,6 @@
                   SingletonLifestyleHandler singleton = new SingletonLifestyleHandler();
                   singleton.enableLogging( getLogger() );
                   singleton.contextualize( context );
  -                singleton.service( m_manager );
                   singleton.initialize();
                   return singleton;
               }
  @@ -270,7 +226,6 @@
                   TransientLifestyleHandler transientHandler = new TransientLifestyleHandler();
                   transientHandler.enableLogging( getLogger() );
                   transientHandler.contextualize( context );
  -                transientHandler.service( m_manager );
                   transientHandler.initialize();
                   return transientHandler;
               }
  @@ -288,7 +243,6 @@
                   ThreadLocalLifestyleHandler thread = new ThreadLocalLifestyleHandler();
                   thread.enableLogging( getLogger() );
                   thread.contextualize( context );
  -                thread.service( m_manager );
                   thread.initialize();
                   return thread;
               }
  
  
  
  1.4       +3 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/LifestyleService.java
  
  Index: LifestyleService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/LifestyleService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LifestyleService.java	3 Dec 2002 06:57:26 -0000	1.3
  +++ LifestyleService.java	9 Jan 2003 15:08:10 -0000	1.4
  @@ -53,6 +53,7 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.assembly.appliance.Appliance;
  +import org.apache.avalon.assembly.locator.Locator;
   
   /**
    * A lifestyle service provides support for the creation of a lifestyle 
  @@ -71,5 +72,5 @@
       * @param context a deployment context
       */
       LifestyleHandler createHandler( 
  -      Appliance appliance, ClassLoader classloader, Context context );
  +      Appliance appliance, ClassLoader classloader, Locator context );
   }
  
  
  
  1.6       +5 -4      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/PooledLifestyleHandler.java
  
  Index: PooledLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/PooledLifestyleHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PooledLifestyleHandler.java	20 Dec 2002 11:54:29 -0000	1.5
  +++ PooledLifestyleHandler.java	9 Jan 2003 15:08:10 -0000	1.6
  @@ -59,7 +59,6 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -71,6 +70,8 @@
   import org.apache.excalibur.mpool.Pool;
   import org.apache.excalibur.mpool.PoolManager;
   import org.apache.excalibur.mpool.ObjectFactory;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.Locator;
   
   /**
    * Lifestyle implementation that provides suppport for the pooled
  @@ -94,7 +95,7 @@
      /**
       * The runtime context.
       */
  -    private Context m_context;
  +    private Locator m_context;
   
      /**
       * The deplyment service to handle lifecycle processing of 
  @@ -150,7 +151,7 @@
       * established by this service.
       * @param context the runtime context
       */
  -    public void contextualize( Context context ) throws ContextException
  +    public void contextualize( Locator context ) throws ContextException
       {
           super.contextualize( context );
           m_poolManager = (PoolManager) context.get( "urn:assembly:pool-manager" );
  
  
  
  1.9       +3 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/SingletonLifestyleHandler.java
  
  Index: SingletonLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/SingletonLifestyleHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SingletonLifestyleHandler.java	21 Dec 2002 03:28:38 -0000	1.8
  +++ SingletonLifestyleHandler.java	9 Jan 2003 15:08:10 -0000	1.9
  @@ -53,12 +53,13 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
   import org.apache.avalon.assembly.appliance.Appliance;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.Locator;
   
   /**
    * The singleton lifestyle handler provides support for object instantiation and 
  
  
  
  1.7       +1 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/TransientLifestyleHandler.java
  
  Index: TransientLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/TransientLifestyleHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TransientLifestyleHandler.java	17 Dec 2002 11:35:50 -0000	1.6
  +++ TransientLifestyleHandler.java	9 Jan 2003 15:08:10 -0000	1.7
  @@ -57,7 +57,6 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.meta.info.DependencyDescriptor;
  
  
  
  1.2       +3 -3      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/locator/Reclaimable.java
  
  Index: Reclaimable.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/locator/Reclaimable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Reclaimable.java	23 Dec 2002 00:13:35 -0000	1.1
  +++ Reclaimable.java	9 Jan 2003 15:08:11 -0000	1.2
  @@ -66,8 +66,8 @@
       /**
        * Release an object
        *
  -     * @param the object to reclaim
  -     * @param locator the context with respect which to reclain the object
  +     * @param the object to be reclaimed
  +     * @param context the context with respect which to reclain the object
        */
  -    void release( Object object, Locator locator );
  +    void release( Object object, Locator context );
   }
  
  
  
  1.2       +4 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/locator/Resolvable.java
  
  Index: Resolvable.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/locator/Resolvable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Resolvable.java	23 Dec 2002 00:13:35 -0000	1.1
  +++ Resolvable.java	9 Jan 2003 15:08:11 -0000	1.2
  @@ -54,6 +54,8 @@
    */
   package org.apache.avalon.assembly.locator;
   
  +import org.apache.avalon.framework.context.ContextException;
  +
   /**
    * This interface is used to indicate objects that need to be
    * resolved in some particular context.
  @@ -66,10 +68,10 @@
       /**
        * Resolve a object to a value.
        *
  -     * @param context the contextwith respect which to resolve
  +     * @param context the context within the the resolution is applied
        * @return the resolved object
        * @throws ContextException if an error occurs
        */
       Object resolve( Locator locator )
  -        throws LocatorException;
  +        throws ContextException;
   }
  
  
  
  1.6       +3 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/logging/DefaultLoggingManager.java
  
  Index: DefaultLoggingManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/logging/DefaultLoggingManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultLoggingManager.java	19 Dec 2002 10:31:55 -0000	1.5
  +++ DefaultLoggingManager.java	9 Jan 2003 15:08:11 -0000	1.6
  @@ -64,9 +64,10 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AvalonFormatter;
   import org.apache.avalon.framework.logger.LogKitLogger;
  +import org.apache.avalon.assembly.locator.Contextualizable;
  +import org.apache.avalon.assembly.locator.Locator;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.excalibur.logger.LoggerManager;
  @@ -148,7 +149,7 @@
       * established by this service.
       * @param context the runtime context
       */
  -    public void contextualize( Context context ) throws ContextException
  +    public void contextualize( Locator context ) throws ContextException
       {
           m_baseDirectory = (File) context.get( "urn:assembly:home" );
   
  
  
  
  1.7       +2 -1      avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/TestCaseBase.java
  
  Index: TestCaseBase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/TestCaseBase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestCaseBase.java	19 Dec 2002 10:46:16 -0000	1.6
  +++ TestCaseBase.java	9 Jan 2003 15:08:11 -0000	1.7
  @@ -14,6 +14,7 @@
   import org.apache.avalon.assembly.logging.TargetDescriptor;
   import org.apache.avalon.assembly.logging.LoggingDescriptor;
   import org.apache.avalon.assembly.logging.DefaultLoggingManager;
  +import org.apache.avalon.assembly.locator.DefaultLocator;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.DefaultContext;
  @@ -50,7 +51,7 @@
                new TargetDescriptor[ 0 ], 
                new Category( "logging", "WARN" ) );
   
  -        DefaultContext context = new DefaultContext();
  +        DefaultLocator context = new DefaultLocator();
           context.put( "urn:assembly:home", m_base );
           context.put( "urn:assembly:logging.descriptor", logging );
           context.makeReadOnly();
  
  
  
  1.12      +2 -3      avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/EngineTestCase.java
  
  Index: EngineTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/assembly/engine/EngineTestCase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- EngineTestCase.java	9 Jan 2003 11:25:26 -0000	1.11
  +++ EngineTestCase.java	9 Jan 2003 15:08:11 -0000	1.12
  @@ -13,8 +13,7 @@
   import java.util.Hashtable;
   import junit.framework.TestCase;
   import org.apache.avalon.framework.Version;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
  +import org.apache.avalon.assembly.locator.DefaultLocator;
   import org.apache.avalon.meta.info.*;
   import org.apache.avalon.meta.model.*;
   import org.apache.avalon.assembly.TestCaseBase;
  @@ -56,7 +55,7 @@
           {
               EngineClassLoader engine = new EngineClassLoader();
               engine.enableLogging( getLogger() );
  -            DefaultContext context = new DefaultContext();
  +            DefaultLocator context = new DefaultLocator();
               context.put( "urn:assembly:engine.bootstrap", "" + bootstrap );
               context.put( "urn:assembly:logging.manager", m_logManager );
               context.makeReadOnly();
  
  
  
  1.3       +9 -3      avalon-sandbox/assembly/src/xdocs/appliance.xml
  
  Index: appliance.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/xdocs/appliance.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- appliance.xml	8 Jan 2003 18:33:22 -0000	1.2
  +++ appliance.xml	9 Jan 2003 15:08:11 -0000	1.3
  @@ -33,8 +33,14 @@
      /**
       * Meta-info attribute name under which an alternative appliance class may be declared.
       */
  -    static final String APPLIANCE_CLASS_ATTRIBUTE_NAME = 
  +    static final String APPLIANCE_CLASS_KEY = 
         "urn:assembly:appliance.class";
  +
  +   /**
  +    * Meta-info attribute name under which an alternative appliance factory class may be declared.
  +    */
  +    static final String APPLIANCE_FACTORY_KEY = 
  +      "urn:assembly:appliance.factory";
   
      /**
       * Get the appliance name.
  
  
  

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


Mime
View raw message