avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl DefaultFactory.java
Date Sat, 03 Jan 2004 15:38:50 GMT
mcconnell    2004/01/03 07:38:50

  Modified:    merlin/activation/api/src/java/org/apache/avalon/activation/appliance
                        Tag: Ver_3_4 Block.java
               merlin/composition/api/src/java/org/apache/avalon/composition/model
                        Tag: Ver_3_4 AssemblyException.java
                        ContainmentContext.java ContainmentModel.java
                        DeploymentModel.java
               merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        Tag: Ver_3_4 DefaultContainmentContext.java
                        DefaultContainmentModel.java
                        DefaultDeploymentModel.java
                        DefaultModelFactory.java
               merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl
                        Tag: Ver_3_4 DefaultFactory.java
  Added:       merlin/composition/api/src/java/org/apache/avalon/composition/model
                        Tag: Ver_3_4 ModelRepository.java
  Log:
  Move assembly content up to model layer.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.3.2.1   +1 -28     avalon/merlin/activation/api/src/java/org/apache/avalon/activation/appliance/Block.java
  
  Index: Block.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/activation/api/src/java/org/apache/avalon/activation/appliance/Block.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- Block.java	29 Dec 2003 14:31:21 -0000	1.3
  +++ Block.java	3 Jan 2004 15:38:49 -0000	1.3.2.1
  @@ -70,31 +70,4 @@
       */
       ContainmentModel getContainmentModel();
   
  -   /**
  -    * Add a model as a child to this block.
  -    * WARNING: this method may/will be removed
  -    * @param model the model to add as a child of the block
  -    * @return the appliance established to handle the model
  -    * @exception ApplianceException if a error occurs
  -    */
  -    //Appliance addModel( Model model ) throws ApplianceException;
  -
  -   /**
  -    * Add a model as a child to this block.
  -    * WARNING: this method may/will be removed
  -    * @param url the model url
  -    * @return the appliance established to handle the model
  -    * @exception ApplianceException if a error occurs
  -    */
  -    //Appliance addModel( URL url ) throws ApplianceException;
  -
  -   /**
  -    * Add a model as a child to this block.
  -    * WARNING: this method may/will be removed
  -    * @param url the model url
  -    * @return the appliance established to handle the model
  -    * @exception ApplianceException if a error occurs
  -    */
  -    //void removeAppliance( String name ) throws ApplianceException;
  -
   }
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +2 -2      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Attic/AssemblyException.java
  
  Index: AssemblyException.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Attic/AssemblyException.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- AssemblyException.java	3 Jan 2004 13:28:37 -0000	1.1.2.1
  +++ AssemblyException.java	3 Jan 2004 15:38:50 -0000	1.1.2.2
  @@ -4,7 +4,7 @@
                      The Apache Software License, Version 1.1
    ============================================================================
   
  - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  + Copyright (C) 1999-2004 The Apache Software Foundation. All rights reserved.
   
    Redistribution and use in source and binary forms, with or without modifica-
    tion, are permitted provided that the following conditions are met:
  
  
  
  1.1.1.1.2.1 +8 -1      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentContext.java
  
  Index: ContainmentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentContext.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- ContainmentContext.java	24 Sep 2003 09:31:15 -0000	1.1.1.1
  +++ ContainmentContext.java	3 Jan 2004 15:38:50 -0000	1.1.1.1.2.1
  @@ -129,4 +129,11 @@
       ClassLoader getClassLoader();
   
   
  +   /**
  +    * Return the model repository.
  +    *
  +    * @return the model repository
  +    */
  +    ModelRepository getModelRepository();
  +
   }
  
  
  
  1.9.2.1   +2 -2      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java
  
  Index: ContainmentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- ContainmentModel.java	29 Dec 2003 14:31:21 -0000	1.9
  +++ ContainmentModel.java	3 Jan 2004 15:38:50 -0000	1.9.2.1
  @@ -68,7 +68,7 @@
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public interface ContainmentModel extends Model
  +public interface ContainmentModel extends Model, Composite
   {
       public static String SEPERATOR = "/";
   
  
  
  
  1.7.2.1   +2 -2      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/DeploymentModel.java
  
  Index: DeploymentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/DeploymentModel.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- DeploymentModel.java	14 Dec 2003 14:09:59 -0000	1.7
  +++ DeploymentModel.java	3 Jan 2004 15:38:50 -0000	1.7.2.1
  @@ -61,7 +61,7 @@
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public interface DeploymentModel extends Model
  +public interface DeploymentModel extends Model, Composite
   {
   
      /**
  
  
  
  No                   revision
  
  Index: DeploymentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/DeploymentModel.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- DeploymentModel.java	14 Dec 2003 14:09:59 -0000	1.7
  +++ DeploymentModel.java	3 Jan 2004 15:38:50 -0000	1.7.2.1
  @@ -61,7 +61,7 @@
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public interface DeploymentModel extends Model
  +public interface DeploymentModel extends Model, Composite
   {
   
      /**
  
  
  
  No                   revision
  
  Index: DeploymentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/DeploymentModel.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- DeploymentModel.java	14 Dec 2003 14:09:59 -0000	1.7
  +++ DeploymentModel.java	3 Jan 2004 15:38:50 -0000	1.7.2.1
  @@ -61,7 +61,7 @@
    * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public interface DeploymentModel extends Model
  +public interface DeploymentModel extends Model, Composite
   {
   
      /**
  
  
  
  1.1.2.1   +119 -0    avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Attic/ModelRepository.java
  
  
  
  
  No                   revision
  No                   revision
  1.2.2.1   +21 -5     avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentContext.java
  
  Index: DefaultContainmentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentContext.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- DefaultContainmentContext.java	28 Oct 2003 20:21:00 -0000	1.2
  +++ DefaultContainmentContext.java	3 Jan 2004 15:38:50 -0000	1.2.2.1
  @@ -55,6 +55,7 @@
   import org.apache.avalon.composition.model.SystemContext;
   import org.apache.avalon.composition.model.ContainmentContext;
   import org.apache.avalon.composition.model.ClassLoaderModel;
  +import org.apache.avalon.composition.model.ModelRepository;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
  @@ -98,6 +99,8 @@
   
       private final String m_name;
   
  +    private final ModelRepository m_repository;
  +
       //==============================================================
       // constructor
       //==============================================================
  @@ -112,9 +115,9 @@
       */
       public DefaultContainmentContext( 
         Logger logger, SystemContext system, ClassLoaderModel model, 
  -      ContainmentProfile profile )
  +      ModelRepository repository, ContainmentProfile profile )
       {
  -        this( logger, system, model, 
  +        this( logger, system, model, repository,
             system.getHomeDirectory(), system.getTempDirectory(), 
             profile, null, "" );
       }
  @@ -125,6 +128,7 @@
       * @param logger the logging channel to assign
       * @param system the system context
       * @param model the classloader model
  +    * @param repository the parent model repository
       * @param home the directory for the container
       * @param temp a temporary directory for the container
       * @param profile the containment profile
  @@ -133,7 +137,7 @@
       * @param name the assigned containment context name
       */
       public DefaultContainmentContext( 
  -      Logger logger, SystemContext system, ClassLoaderModel model, 
  +      Logger logger, SystemContext system, ClassLoaderModel model, ModelRepository repository,
         File home, File temp, ContainmentProfile profile, String partition, String name )
       {
           if( logger == null )
  @@ -176,6 +180,7 @@
               throw new IllegalArgumentException( error );
           }
   
  +        m_repository = new DefaultModelRepository( repository, logger );
           m_logger = logger;
           m_system = system;
           m_model = model;
  @@ -264,6 +269,16 @@
       }
   
      /**
  +    * Return the model repository.
  +    *
  +    * @return the model repository
  +    */
  +    public ModelRepository getModelRepository()
  +    {
  +        return m_repository;
  +    }
  +
  +   /**
       * Return the containment classloader model.
       *
       * @return the classloader model
  @@ -275,7 +290,8 @@
   
      /**
       * Return the containment classloader.  This method is a 
  -    * convinience operation equivalent to getClassLoaderModel().getClassLoader(); 
  +    * convinience operation equivalent to 
  +    * getClassLoaderModel().getClassLoader(); 
       *
       * @return the classloader
       */
  
  
  
  1.13.2.1  +102 -18   avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.13
  retrieving revision 1.13.2.1
  diff -u -r1.13 -r1.13.2.1
  --- DefaultContainmentModel.java	1 Jan 2004 13:08:56 -0000	1.13
  +++ DefaultContainmentModel.java	3 Jan 2004 15:38:50 -0000	1.13.2.1
  @@ -77,6 +77,7 @@
   import org.apache.avalon.composition.data.builder.XMLContainmentProfileCreator;
   import org.apache.avalon.composition.event.CompositionEvent;
   import org.apache.avalon.composition.event.CompositionEventListener;
  +import org.apache.avalon.composition.model.Composite;
   import org.apache.avalon.composition.model.ClassLoaderContext;
   import org.apache.avalon.composition.model.ClassLoaderModel;
   import org.apache.avalon.composition.model.ContainmentModel;
  @@ -85,9 +86,11 @@
   import org.apache.avalon.composition.model.Model;
   import org.apache.avalon.composition.model.ModelException;
   import org.apache.avalon.composition.model.ModelRuntimeException;
  +import org.apache.avalon.composition.model.ModelRepository;
   import org.apache.avalon.composition.model.ModelSelector;
   import org.apache.avalon.composition.model.ProfileSelector;
   import org.apache.avalon.composition.model.TypeRepository;
  +import org.apache.avalon.composition.model.AssemblyException;
   import org.apache.avalon.composition.logging.LoggingManager;
   import org.apache.avalon.composition.util.StringHelper;
   import org.apache.avalon.repository.Repository;
  @@ -144,9 +147,9 @@
           }
       }
   
  -    //==============================================================
  +    //--------------------------------------------------------------
       // state
  -    //==============================================================
  +    //--------------------------------------------------------------
   
       private ContainmentContext m_context;
   
  @@ -161,9 +164,11 @@
   
       private final LinkedList m_compositionListeners = new LinkedList();
   
  -    //==============================================================
  +    private final DefaultState m_assembly = new DefaultState();
  +
  +    //--------------------------------------------------------------
       // constructor
  -    //==============================================================
  +    //--------------------------------------------------------------
   
      /**
       * Creation of a new containment model.
  @@ -195,9 +200,9 @@
           }
       }
   
  -    //==============================================================
  +    //--------------------------------------------------------------
       // Model
  -    //==============================================================
  +    //--------------------------------------------------------------
   
      /**
       * Return the classloader model.
  @@ -255,10 +260,83 @@
           return false;
       }
   
  -    //==============================================================
  -    // ContainmentModel
  -    //==============================================================
  +    //--------------------------------------------------------------
  +    // Composite
  +    //--------------------------------------------------------------
   
  +    /**
  +     * Returns the assembled state of the model.
  +     * @return true if this model is assembled
  +     */
  +    public boolean isAssembled()
  +    {
  +        return m_assembly.isEnabled();
  +    }
  +
  +    /**
  +     * Assemble the model.
  +     * @exception Exception if an error occurs during model assembly
  +     */
  +    public void assemble() throws AssemblyException
  +    {
  +        synchronized( m_assembly )
  +        {
  +            if( isAssembled() )
  +            {
  +                return;
  +            }
  +
  +            getLogger().debug( "assembly phase" );
  +            Model[] models = m_context.getModelRepository().getModels();
  +            for( int i=0; i<models.length; i++ )
  +            {
  +                Model model = models[i];
  +                if( model instanceof Composite )
  +                {
  +                    ((Composite)model).assemble();
  +                }
  +            }
  +
  +            m_assembly.setEnabled( true );
  +        }
  +    }
  +
  +    /**
  +     * Disassemble the model.
  +     */
  +    public void disassemble()
  +    {
  +        synchronized( m_assembly )
  +        {
  +            if( !isAssembled() )
  +            {
  +                return;
  +            }
  +
  +            m_assembly.setEnabled( false );
  +        }
  +    }
  +
  +    /**
  +     * Return the set of models assigned as providers.
  +     * @return the providers consumed by the model
  +     * @exception IllegalStateException if the model is not in an assembled state 
  +     */
  +    public Model[] getProviders()
  +    {
  +        if( !isAssembled() ) 
  +        {
  +             final String error = 
  +               "Model is not assembled.";
  +             throw new IllegalStateException( error );
  +        }
  +
  +        return new Model[0];
  +    }
  +
  +    //--------------------------------------------------------------
  +    // ContainmentModel
  +    //--------------------------------------------------------------
   
      /**
       * Add a composition listener to the model.
  @@ -376,9 +454,10 @@
   
       private Model addModel( String name, Model model ) throws ModelException
       {
  -        synchronized( m_models )
  +        ModelRepository repository = m_context.getModelRepository();
  +        synchronized( repository )
           {
  -            m_models.put( name, model );
  +            repository.addModel( name, model );
               CompositionEvent event = new CompositionEvent( this, model );
               fireModelAddedEvent( event );
               return model;
  @@ -416,9 +495,10 @@
       */
       public void removeModel( String name ) throws IllegalArgumentException
       {
  -        synchronized( m_models )
  +        ModelRepository repository = m_context.getModelRepository();
  +        synchronized( repository )
           {
  -            Model model = (Model) m_models.get( name );
  +            Model model = (Model) repository.getModel( name );
               if( null == name )
               {
                   final String error = 
  @@ -429,7 +509,7 @@
               }
               else
               {
  -                m_models.remove( name );
  +                repository.removeModel( model );
                   CompositionEvent event = new CompositionEvent( this, model );
                   fireModelRemovedEvent( event );
               }
  @@ -490,6 +570,7 @@
                 m_context.getClassLoaderModel().getTypeRepository().getType( base );
               final File home = new File( m_context.getHomeDirectory(), name );
               final File temp = new File( m_context.getTempDirectory(), name );
  +
               DefaultDeploymentContext context = 
                 new DefaultDeploymentContext( 
                   logger, name, m_context, profile, type, base, home, temp, partition );
  @@ -582,10 +663,13 @@
               final File temp = new File( m_context.getTempDirectory(), name );
               final Logger logger = getLogger().getChildLogger( name );
   
  +            ModelRepository modelRepository = 
  +              m_context.getModelRepository();
  +
               DefaultContainmentContext context = 
                 new DefaultContainmentContext( 
                   logger, m_context.getSystemContext(), 
  -                classLoaderModel, home, temp, profile, partition, name );
  +                classLoaderModel, modelRepository, home, temp, profile, partition, name
);
   
               //
               // TODO: lookup the profile for a factory declaration, then 
  @@ -908,7 +992,7 @@
       */
       public Model[] getModels()
       {
  -        return (Model[]) m_models.values().toArray( new Model[0] );
  +        return m_context.getModelRepository().getModels();
       }
   
      /**
  @@ -961,7 +1045,7 @@
               }
               else
               {
  -                return (Model) m_models.get( path );
  +                return m_context.getModelRepository().getModel( path );
               }
           }
       }
  
  
  
  1.9.2.1   +78 -11    avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentModel.java
  
  Index: DefaultDeploymentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentModel.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- DefaultDeploymentModel.java	14 Dec 2003 14:09:59 -0000	1.9
  +++ DefaultDeploymentModel.java	3 Jan 2004 15:38:50 -0000	1.9.2.1
  @@ -54,10 +54,12 @@
   import java.util.Enumeration;
   import java.util.Properties;
   
  +import org.apache.avalon.composition.model.AssemblyException;
   import org.apache.avalon.composition.model.ContextModel;
   import org.apache.avalon.composition.model.DependencyModel;
   import org.apache.avalon.composition.model.DeploymentModel;
   import org.apache.avalon.composition.model.DeploymentContext;
  +import org.apache.avalon.composition.model.Model;
   import org.apache.avalon.composition.model.ModelException;
   import org.apache.avalon.composition.model.SystemContext;
   import org.apache.avalon.composition.model.StageModel;
  @@ -90,9 +92,9 @@
    */
   public class DefaultDeploymentModel extends DefaultModel implements DeploymentModel
   {
  -    //==============================================================
  +    //--------------------------------------------------------------
       // static
  -    //==============================================================
  +    //--------------------------------------------------------------
   
       private static final Resources REZ =
               ResourceManager.getPackageResources( DefaultDeploymentModel.class );
  @@ -104,9 +106,9 @@
         new DefaultConfiguration( 
           "configuration", DeploymentModel.class.getName() );
   
  -    //==============================================================
  +    //--------------------------------------------------------------
       // immutable state
  -    //==============================================================
  +    //--------------------------------------------------------------
   
       private final DeploymentContext m_context;
   
  @@ -118,9 +120,11 @@
   
       private final StageModel[] m_stages;
   
  -    //==============================================================
  +    private final DefaultState m_assembly = new DefaultState();
  +
  +    //--------------------------------------------------------------
       // mutable state
  -    //==============================================================
  +    //--------------------------------------------------------------
   
       private CategoriesDirective m_categories;
   
  @@ -132,9 +136,9 @@
   
       private int m_collection;
   
  -    //==============================================================
  +    //--------------------------------------------------------------
       // constructor
  -    //==============================================================
  +    //--------------------------------------------------------------
   
      /**
       * Creation of a new deployment model.
  @@ -249,9 +253,72 @@
           }
       }
   
  -    //==============================================================
  +    //--------------------------------------------------------------
  +    // Composite
  +    //--------------------------------------------------------------
  +
  +    /**
  +     * Returns the assembled state of the model.
  +     * @return true if this model is assembled
  +     */
  +    public boolean isAssembled()
  +    {
  +        return m_assembly.isEnabled();
  +    }
  +
  +    /**
  +     * Assemble the model.
  +     * @exception Exception if an error occurs during model assembly
  +     */
  +    public void assemble() throws AssemblyException
  +    {
  +        synchronized( m_assembly )
  +        {
  +            if( isAssembled() )
  +            {
  +                return;
  +            }
  +
  +            m_assembly.setEnabled( true );
  +        }
  +    }
  +
  +    /**
  +     * Disassemble the model.
  +     */
  +    public void disassemble()
  +    {
  +        synchronized( m_assembly )
  +        {
  +            if( !isAssembled() )
  +            {
  +                return;
  +            }
  +
  +            m_assembly.setEnabled( false );
  +        }
  +    }
  +
  +    /**
  +     * Return the set of models assigned as providers.
  +     * @return the providers consumed by the model
  +     * @exception IllegalStateException if the model is not in an assembled state 
  +     */
  +    public Model[] getProviders()
  +    {
  +        if( !isAssembled() ) 
  +        {
  +             final String error = 
  +               "Model is not assembled.";
  +             throw new IllegalStateException( error );
  +        }
  +
  +        return new Model[0];
  +    }
  +
  +    //--------------------------------------------------------------
       // Model
  -    //==============================================================
  +    //--------------------------------------------------------------
   
      /**
       * Return the set of services produced by the model.
  
  
  
  1.3.2.1   +2 -2      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java
  
  Index: DefaultModelFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- DefaultModelFactory.java	28 Oct 2003 20:21:00 -0000	1.3
  +++ DefaultModelFactory.java	3 Jan 2004 15:38:50 -0000	1.3.2.1
  @@ -244,7 +244,7 @@
                 new DefaultClassLoaderModel( classLoaderContext );
   
               return new DefaultContainmentContext( 
  -                logger, m_system, classLoaderModel, profile );
  +                logger, m_system, classLoaderModel, null, profile );
           }
           catch( Throwable e )
           {
  
  
  
  No                   revision
  No                   revision
  1.7.2.1   +4 -5      avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java
  
  Index: DefaultFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- DefaultFactory.java	14 Dec 2003 23:09:03 -0000	1.7
  +++ DefaultFactory.java	3 Jan 2004 15:38:50 -0000	1.7.2.1
  @@ -84,12 +84,14 @@
   import org.apache.avalon.composition.model.SystemContext;
   import org.apache.avalon.composition.model.ClassLoaderContext;
   import org.apache.avalon.composition.model.ClassLoaderModel;
  +import org.apache.avalon.composition.model.ModelRepository;
   import org.apache.avalon.composition.model.impl.DefaultSystemContext;
   import org.apache.avalon.composition.model.impl.DefaultModelFactory;
   import org.apache.avalon.composition.model.impl.DefaultContainmentContext;
   import org.apache.avalon.composition.model.impl.DefaultContainmentModel;
   import org.apache.avalon.composition.model.impl.DefaultClassLoaderModel;
   import org.apache.avalon.composition.model.impl.DefaultClassLoaderContext;
  +import org.apache.avalon.composition.model.impl.DefaultModelRepository;
   import org.apache.avalon.composition.util.StringHelper;
   
   import org.apache.avalon.excalibur.i18n.ResourceManager;
  @@ -393,9 +395,6 @@
   
           final Logger systemLogger = getLogger();
   
  -        //ClassLoader impl = 
  -        //  Thread.currentThread().getContextClassLoader();
  -
           ContainmentModel system = 
             new DefaultContainmentModel(
               createContainmentContext( 
  @@ -596,7 +595,7 @@
       }
   
      /**
  -    * Creation of a new containment context.
  +    * Creation of a new root containment context.
       *
       * @param profile a containment profile 
       * @return the containment context
  @@ -624,9 +623,9 @@
             logger, 
             context, 
             classLoaderModel,
  +          null,
             profile );
       }
  -
   
       private ContainmentProfile getContainmentProfile( Configuration config )
         throws KernelException
  
  
  

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


Mime
View raw message