You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2004/02/10 17:31:17 UTC

cvs commit: avalon/merlin/platform/tutorials/lifecycle/activation project.xml

mcconnell    2004/02/10 08:31:17

  Modified:    merlin   maven.xml project.properties
               merlin/facilities/http/impl project.xml
               merlin/facilities/http/impl/src/java/org/apache/avalon/http/impl
                        ComponentModelHolder.java
               merlin/kernel/api project.xml
               merlin/kernel/api/src/java/org/apache/avalon/merlin
                        Kernel.java KernelCriteria.java
               merlin/kernel/impl maven.xml project.properties project.xml
               merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl
                        DefaultCriteria.java DefaultFactory.java
                        DefaultKernel.java
               merlin/kernel/servlet project.xml
               merlin/kernel/servlet/src/java/org/apache/avalon/merlin/servlet
                        MerlinServlet.java
               merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit
                        AbstractMerlinTestCase.java
               merlin/platform/tutorials/lifecycle/activation project.xml
  Added:       merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        DefaultSystemContext.java
  Log:
  Synchronize kernel and facilities with composition, activation and meta updates.
  
  Revision  Changes    Path
  1.48      +1 -4      avalon/merlin/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/maven.xml,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- maven.xml	5 Feb 2004 03:17:44 -0000	1.47
  +++ maven.xml	10 Feb 2004 16:31:16 -0000	1.48
  @@ -15,7 +15,7 @@
     -->
   
     <ant:property name="avalon.util.plugin.version" value="1.0-SNAPSHOT"/>
  -  <ant:property name="meta.plugin.version" value="1.3.2"/>
  +  <ant:property name="meta.plugin.version" value="1.4-SNAPSHOT"/>
     <ant:property name="merlin.cli.version" value="3.3-SNAPSHOT"/>
     <ant:property name="merlin.plugin.version" value="3.3-SNAPSHOT"/>
   
  @@ -41,7 +41,6 @@
     -->
   
     <ant:property file="project.properties"/>
  -  <ant:property name="maven.docs.src" value="${basedir}/platform/xdocs"/>
     <ant:property name="merlin.build.inst" value="merlin"/>
     <ant:property name="merlin.build.inst.dir" 
       value="${maven.build.dir}/${merlin.build.inst}"/>
  @@ -50,8 +49,6 @@
     <ant:property name="pom.organization.identifier" value="ASF"/>
     <ant:property name="pom.specificationVersion" value="3.0"/>
     <ant:property name="maven.license.licenseFile" value="${basedir}/LICENSE.txt"/>
  -  <ant:property name="maven.javadoc.stylesheet" 
  -    value="${basedir}/platform/src/etc/stylesheet.css"/>
     <maven:snapshot project="${pom}"/>
   
     <!--
  
  
  
  1.8       +1 -0      avalon/merlin/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/project.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.properties	19 Jan 2004 13:35:11 -0000	1.7
  +++ project.properties	10 Feb 2004 16:31:16 -0000	1.8
  @@ -9,6 +9,7 @@
   maven.javadoc.stylesheet =${basedir}/platform/src/etc/stylesheet.css
   maven.xdoc.poweredby.image=
   maven.docs.dest = ${maven.build.dir}/merlin/docs
  +maven.docs.src = ${basedir}/platform/xdocs
   
   #
   # custom tags spec
  
  
  
  1.17      +288 -19   avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContext.java
  
  
  
  
  1.6       +3 -1      avalon/merlin/facilities/http/impl/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/facilities/http/impl/project.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- project.xml	5 Feb 2004 18:59:07 -0000	1.5
  +++ project.xml	10 Feb 2004 16:31:16 -0000	1.6
  @@ -55,7 +55,7 @@
       <dependency>
         <groupId>avalon-meta</groupId>
         <artifactId>avalon-meta-api</artifactId>
  -      <version>1.3</version>
  +      <version>1.4-SNAPSHOT</version>
       </dependency>
   
       <dependency>
  @@ -64,11 +64,13 @@
         <version>2.0-SNAPSHOT</version>
       </dependency>
   
  +    <!--
       <dependency>
         <groupId>avalon-activation</groupId>
         <artifactId>avalon-activation-api</artifactId>
         <version>2.0-SNAPSHOT</version>
       </dependency>
  +    -->
   
       <dependency>
         <groupId>merlin</groupId>
  
  
  
  1.4       +2 -18     avalon/merlin/facilities/http/impl/src/java/org/apache/avalon/http/impl/ComponentModelHolder.java
  
  Index: ComponentModelHolder.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/facilities/http/impl/src/java/org/apache/avalon/http/impl/ComponentModelHolder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ComponentModelHolder.java	6 Feb 2004 15:27:14 -0000	1.3
  +++ ComponentModelHolder.java	10 Feb 2004 16:31:16 -0000	1.4
  @@ -30,8 +30,7 @@
   import javax.servlet.http.HttpServletResponse;
   
   import org.apache.avalon.composition.model.ComponentModel;
  -import org.apache.avalon.composition.runtime.Resolver;
  -import org.apache.avalon.composition.runtime.Commissionable;
  +import org.apache.avalon.composition.model.Resolver;
   import org.apache.avalon.http.HttpRuntimeException;
   import org.apache.avalon.http.Handler;
   import org.apache.avalon.http.HandlerException;
  @@ -110,7 +109,6 @@
       private class ServletAdapter extends GenericServlet
       {
           private final ComponentModel m_model;
  -        private Resolver m_resolver;
    
           public ServletAdapter( final ComponentModel model )
           {
  @@ -138,21 +136,7 @@
           {
               try
               {
  -                return (Handler) getResolver().resolve();
  -            }
  -            catch( Throwable e )
  -            {
  -                throw new ServletException( e.getMessage(), e.getCause() );
  -            }
  -        }
  -
  -        private Resolver getResolver() throws ServletException
  -        {
  -            if( m_resolver != null ) return m_resolver;
  -            try
  -            {
  -                m_resolver = (Resolver) m_model.getHandler();
  -                return m_resolver;
  +                return (Handler) m_model.resolve();
               }
               catch( Throwable e )
               {
  
  
  
  1.6       +0 -5      avalon/merlin/kernel/api/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/api/project.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- project.xml	24 Jan 2004 23:25:31 -0000	1.5
  +++ project.xml	10 Feb 2004 16:31:16 -0000	1.6
  @@ -33,11 +33,6 @@
         <artifactId>avalon-composition-api</artifactId>
         <version>2.0-SNAPSHOT</version>
       </dependency>
  -    <dependency>
  -      <groupId>avalon-activation</groupId>
  -      <artifactId>avalon-activation-api</artifactId>
  -      <version>2.0-SNAPSHOT</version>
  -    </dependency>
     </dependencies>
     
   </project>
  
  
  
  1.5       +9 -9      avalon/merlin/kernel/api/src/java/org/apache/avalon/merlin/Kernel.java
  
  Index: Kernel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/api/src/java/org/apache/avalon/merlin/Kernel.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Kernel.java	24 Jan 2004 23:25:31 -0000	1.4
  +++ Kernel.java	10 Feb 2004 16:31:16 -0000	1.5
  @@ -18,8 +18,8 @@
   package org.apache.avalon.merlin;
   
   import org.apache.avalon.merlin.event.KernelEventListener;
  -import org.apache.avalon.activation.appliance.Appliance;
  -import org.apache.avalon.activation.appliance.Block;
  +import org.apache.avalon.composition.model.ContainmentModel;
  +import org.apache.avalon.composition.model.DeploymentModel;
   
   /**
    * A Kernel is the root of a containment solution. This interfaces 
  @@ -55,16 +55,16 @@
       void removeKernelEventListener( KernelEventListener listener );
   
      /**
  -    * Return the root block.
  -    * @return the root application containment block
  +    * Return the root containment model.
  +    * @return the root model
       */
  -    Block getBlock();
  +    ContainmentModel getModel();
   
      /**
  -    * Return the applicance matching the supplied path.
  -    * @return the appliance
  +    * Return a model matching the supplied path.
  +    * @return the model
       */
  -    Appliance locate( String path ) throws KernelException;
  +    DeploymentModel locate( String path );
   
      /**
       * Return the current state of the kernel.
  
  
  
  1.6       +25 -1     avalon/merlin/kernel/api/src/java/org/apache/avalon/merlin/KernelCriteria.java
  
  Index: KernelCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/api/src/java/org/apache/avalon/merlin/KernelCriteria.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- KernelCriteria.java	24 Jan 2004 23:25:31 -0000	1.5
  +++ KernelCriteria.java	10 Feb 2004 16:31:16 -0000	1.6
  @@ -85,6 +85,18 @@
         "merlin.logging.implementation";
   
      /**
  +    * Merlin logging configuration key.
  +    */
  +    String MERLIN_RUNTIME_IMPLEMENTATION = 
  +      "merlin.runtime.implementation";
  +
  +   /**
  +    * Merlin logging configuration key.
  +    */
  +    String MERLIN_CS_RUNTIME_IMPLEMENTATION = 
  +      "merlin.runtime.csi.implementation";
  +
  +   /**
       * Merlin target configuration override path.
       */
       String MERLIN_OVERRIDE = 
  @@ -217,6 +229,18 @@
       * @return the logging implementation artifact
       */
       Artifact getLoggingImplementation();
  +
  +   /**
  +    * Return the runtime implementation artifact.
  +    * @return the runtime implementation artifact
  +    */
  +    Artifact getRuntimeImplementation();
  +
  +   /**
  +    * Return the code secure runtime implementation artifact.
  +    * @return the runtime implementation artifact
  +    */
  +    Artifact getSecureRuntimeImplementation();
   
      /**
       * Return the url to the configuration override targets.
  
  
  
  1.6       +13 -4     avalon/merlin/kernel/impl/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/maven.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- maven.xml	24 Jan 2004 23:25:31 -0000	1.5
  +++ maven.xml	10 Feb 2004 16:31:16 -0000	1.6
  @@ -18,15 +18,24 @@
     <postGoal name="java:compile">
       <ant:echo file="${maven.build.dir}/classes/merlin.properties">
   #
  -# Merlin Implementation target specification.
  -#
  -
  +# merlin system implementation
   merlin.implementation = ${pom.groupId}:${pom.artifactId};${pom.currentVersion}
   
   #
  -# logging system implementation
  +# logging implementation
   merlin.logging.implementation = ${merlin.logging.implementation}
   
  +#
  +# runtime implementation
  +merlin.runtime.implementation = ${merlin.runtime.implementation}
  +
  +#
  +# runtime code secure implementation
  +merlin.runtime.csi.implementation = ${merlin.runtime.csi.implementation}
  +
  +#
  +# EOF
  +#
   </ant:echo>
       <ant:mkdir dir="${maven.repo.local}/${pom.groupId}/properties"/>
       <ant:copy toDir="${maven.repo.local}/${pom.groupId}/properties" 
  
  
  
  1.4       +3 -1      avalon/merlin/kernel/impl/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/project.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.properties	24 Jan 2004 23:25:31 -0000	1.3
  +++ project.properties	10 Feb 2004 16:31:16 -0000	1.4
  @@ -8,4 +8,6 @@
   # default logging strategy
   #
   
  -merlin.logging.implementation = artifact:avalon-logging/avalon-logkit-impl?version=1.0-SNAPSHOT
  \ No newline at end of file
  +merlin.logging.implementation = artifact:avalon-logging/avalon-logkit-impl?version=1.0-SNAPSHOT
  +merlin.runtime.implementation = artifact:avalon-activation/avalon-activation-impl?version=2.0-SNAPSHOT
  +merlin.runtime.csi.implementation = artifact:avalon-activation/avalon-activation-csi?version=2.0-SNAPSHOT
  
  
  
  1.24      +4 -25     avalon/merlin/kernel/impl/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/project.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- project.xml	6 Feb 2004 15:27:15 -0000	1.23
  +++ project.xml	10 Feb 2004 16:31:16 -0000	1.24
  @@ -33,28 +33,6 @@
       <!-- avalon dependecies -->
   
       <dependency>
  -      <groupId>avalon-activation</groupId>
  -      <artifactId>avalon-activation-api</artifactId>
  -      <version>2.0-SNAPSHOT</version>
  -      <properties>
  -        <avalon.classloader>spi</avalon.classloader>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <groupId>avalon-activation</groupId>
  -      <artifactId>avalon-activation-spi</artifactId>
  -      <version>2.0-SNAPSHOT</version>
  -      <properties>
  -        <avalon.classloader>spi</avalon.classloader>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <groupId>avalon-activation</groupId>
  -      <artifactId>avalon-activation-impl</artifactId>
  -      <version>2.0-SNAPSHOT</version>
  -    </dependency>
  -
  -    <dependency>
         <groupId>avalon-repository</groupId>
         <artifactId>avalon-repository-api</artifactId>
         <version>1.3-SNAPSHOT</version>
  @@ -105,7 +83,7 @@
       <dependency>
         <groupId>avalon-meta</groupId>
         <artifactId>avalon-meta-api</artifactId>
  -      <version>1.3</version>
  +      <version>1.4-SNAPSHOT</version>
         <properties>
           <avalon.classloader>api</avalon.classloader>
         </properties>
  @@ -113,7 +91,7 @@
       <dependency>
         <groupId>avalon-meta</groupId>
         <artifactId>avalon-meta-spi</artifactId>
  -      <version>1.3</version>
  +      <version>1.4-SNAPSHOT</version>
         <properties>
           <avalon.classloader>spi</avalon.classloader>
         </properties>
  @@ -121,7 +99,7 @@
       <dependency>
         <groupId>avalon-meta</groupId>
         <artifactId>avalon-meta-impl</artifactId>
  -      <version>1.3.1</version>
  +      <version>1.4-SNAPSHOT</version>
       </dependency>
   
       <dependency>
  @@ -151,6 +129,7 @@
         <artifactId>avalon-framework-impl</artifactId>
         <version>4.1.5</version>
       </dependency>
  +
       <dependency>
         <groupId>avalon-util</groupId>
         <artifactId>avalon-util-defaults</artifactId>
  
  
  
  1.19      +27 -1     avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java
  
  Index: DefaultCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DefaultCriteria.java	2 Feb 2004 00:44:09 -0000	1.18
  +++ DefaultCriteria.java	10 Feb 2004 16:31:16 -0000	1.19
  @@ -168,6 +168,12 @@
                 MERLIN_LOGGING_IMPLEMENTATION, 
                 String.class, null ),
               new Parameter( 
  +              MERLIN_RUNTIME_IMPLEMENTATION, 
  +              String.class, null ),
  +            new Parameter( 
  +              MERLIN_CS_RUNTIME_IMPLEMENTATION, 
  +              String.class, null ),
  +            new Parameter( 
                 MERLIN_OVERRIDE, String.class, null ),
               new Parameter( 
                 MERLIN_DIR, File.class, context.getInitialWorkingDirectory() ),
  @@ -519,6 +525,26 @@
       public Artifact getLoggingImplementation()
       {
           String value = (String) get( MERLIN_LOGGING_IMPLEMENTATION );
  +        return Artifact.createArtifact( value );
  +    }
  +
  +   /**
  +    * Return the artifact reference to the runtime implementation factory .
  +    * @return the runtime implementation factory artifact
  +    */
  +    public Artifact getRuntimeImplementation()
  +    {
  +        String value = (String) get( MERLIN_RUNTIME_IMPLEMENTATION );
  +        return Artifact.createArtifact( value );
  +    }
  +
  +   /**
  +    * Return the artifact reference to the secure runtime implementation factory .
  +    * @return the secure runtime implementation factory artifact
  +    */
  +    public Artifact getSecureRuntimeImplementation()
  +    {
  +        String value = (String) get( MERLIN_RUNTIME_IMPLEMENTATION );
           return Artifact.createArtifact( value );
       }
   
  
  
  
  1.27      +23 -18    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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- DefaultFactory.java	7 Feb 2004 23:32:04 -0000	1.26
  +++ DefaultFactory.java	10 Feb 2004 16:31:16 -0000	1.27
  @@ -26,9 +26,6 @@
   import java.util.Iterator;
   import java.util.Locale;
   
  -import org.apache.avalon.activation.appliance.Block;
  -import org.apache.avalon.activation.appliance.impl.AbstractBlock;
  -
   import org.apache.avalon.logging.data.CategoriesDirective;
   import org.apache.avalon.logging.provider.LoggingManager;
   import org.apache.avalon.logging.provider.LoggingCriteria;
  @@ -38,11 +35,9 @@
   import org.apache.avalon.composition.data.builder.XMLTargetsCreator;
   import org.apache.avalon.composition.data.builder.XMLComponentProfileCreator;
   import org.apache.avalon.composition.data.builder.XMLContainmentProfileCreator;
  -import org.apache.avalon.composition.model.ContainmentContext;
  +import org.apache.avalon.composition.provider.ContainmentContext;
   import org.apache.avalon.composition.model.ComponentModel;
   import org.apache.avalon.composition.model.ContainmentModel;
  -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.DeploymentModel;
   import org.apache.avalon.composition.model.ModelRepository;
  @@ -52,6 +47,8 @@
   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.provider.SystemContext;
  +import org.apache.avalon.composition.provider.ClassLoaderContext;
   import org.apache.avalon.composition.util.StringHelper;
   
   import org.apache.avalon.excalibur.i18n.ResourceManager;
  @@ -405,9 +402,13 @@
           // create the system context
           //
   
  +        Artifact runtime = getRuntimeArtifact( criteria );
           File anchor = criteria.getAnchorDirectory();
   
  -        DefaultSystemContext system = new DefaultSystemContext( 
  +        DefaultSystemContext system = 
  +          new DefaultSystemContext( 
  +            context, 
  +            runtime, 
               logging,
               anchor,
               criteria.getContextDirectory(),
  @@ -425,6 +426,18 @@
           return system;
       }
   
  +    private Artifact getRuntimeArtifact( KernelCriteria criteria )
  +    {
  +        if( isCodeSecurityEnabled() )
  +        {
  +            return criteria.getSecureRuntimeImplementation();
  +        }
  +        else
  +        {
  +            return criteria.getRuntimeImplementation();
  +        }
  +    }
  +
       private ContainmentModel createApplicationModel( 
         SystemContext system, Configuration config ) throws Exception
       {
  @@ -438,17 +451,6 @@
           return new DefaultContainmentModel( context );
       }
   
  -    //private ContainmentModel createFacilitiesModel(
  -    //  SystemContext system, Logger logger, Configuration config )
  -    //  throws Exception
  -    //{   
  -    //    ClassLoader spi = Block.class.getClassLoader();
  -    //    ContainmentProfile profile = getContainmentProfile( config );
  -    //    return new DefaultContainmentModel(
  -    //        createContainmentContext( 
  -    //          system, logger, spi, profile ) );
  -    //}
  -
      /**
       * Creation of a new root containment context.
       *
  @@ -638,14 +640,17 @@
           Artifact artifact = criteria.getLoggingImplementation();
           Builder builder = m_context.newBuilder( m_classloader, artifact );
           Factory factory = builder.getFactory();
  +
           LoggingCriteria params = getLoggingCriteria( factory );
           if( conf.getAttribute( "debug", "false" ).equals( "true" ) )
           {
               params.setBootstrapLogger( 
                 new ConsoleLogger( ConsoleLogger.LEVEL_DEBUG ) );
           }
  +        params.setDebugEnabled( criteria.isDebugEnabled() );
           params.setBaseDirectory( dir );
           params.setConfiguration( conf );
  +
           return (LoggingManager) factory.create( params );
       }
   
  
  
  
  1.11      +20 -32    avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultKernel.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultKernel.java	10 Feb 2004 10:13:55 -0000	1.10
  +++ DefaultKernel.java	10 Feb 2004 16:31:16 -0000	1.11
  @@ -29,23 +29,20 @@
   import org.apache.avalon.merlin.event.KernelEventListener;
   import org.apache.avalon.merlin.event.KernelStateEvent;
   
  -import org.apache.avalon.activation.appliance.Appliance;
  -import org.apache.avalon.activation.appliance.Block;
  -import org.apache.avalon.activation.appliance.impl.DefaultBlock;
  -
   import org.apache.avalon.composition.data.TargetDirective;
  -import org.apache.avalon.composition.model.ContainmentContext;
  +import org.apache.avalon.composition.model.DeploymentModel;
   import org.apache.avalon.composition.model.ContainmentModel;
   import org.apache.avalon.composition.model.ComponentModel;
  -import org.apache.avalon.composition.model.SystemContext;
  +import org.apache.avalon.composition.provider.SystemContext;
   import org.apache.avalon.composition.util.StringHelper;
   
   import org.apache.avalon.logging.provider.LoggingManager;
  -import org.apache.avalon.util.exception.ExceptionHelper;
   
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.logger.Logger;
   
  +import org.apache.avalon.util.exception.ExceptionHelper;
  +
   /**
    * Implementation of the default Merlin Kernel.
    *
  @@ -73,11 +70,13 @@
       // immutable state
       //--------------------------------------------------------------
   
  +    private final ContainmentModel m_model;
  +
       private final LinkedList m_listeners = new LinkedList();
   
       private final KernelContext m_context;
   
  -    private final Block m_application;
  +    //private final Block m_application;
   
       private final State m_state;
   
  @@ -102,8 +101,9 @@
   
           try
           {
  -            m_application = 
  -              new DefaultBlock( context.getApplicationModel() );
  +            m_model = context.getApplicationModel();
  +            //m_application = 
  +            //  new DefaultBlock( context.getApplicationModel() );
           }
           catch( Throwable e )
           {
  @@ -151,33 +151,21 @@
       }
   
      /**
  -    * Return the appliance matching the supplied path.
  -    * @param path an appliance path
  -    * @return the corresponding appliance
  -    * @exception KernelException if the path is unknown
  +    * Return a model matching the supplied path.
  +    * @return the model
       */
  -    public Appliance locate( String path ) throws KernelException
  +    public DeploymentModel locate( String path )
       {
  -        try
  -        {
  -            return m_application.locate( path );
  -        }
  -        catch( Throwable e )
  -        {
  -            final String error = 
  -              "Unable to resolve appliance relative to the path: [" 
  -              + path + "].";
  -            throw new KernelException( error, e );
  -        }
  +        return m_model.getModel( path );
       }
   
      /**
       * Return the root application block.
       * @return the application containment block
       */
  -    public Block getBlock()
  +    public ContainmentModel getModel()
       {
  -        return m_application;
  +        return m_model;
       }
   
       //--------------------------------------------------------------
  @@ -205,7 +193,7 @@
               try
               {
                   setState( ASSEMBLY );
  -                m_application.getModel().assemble();
  +                m_model.assemble();
               }
               catch( Throwable e )
               {
  @@ -223,7 +211,7 @@
               try
               {
                   setState( DEPLOYMENT );
  -                m_application.commission();
  +                m_model.commission();
               }
               catch( Throwable e )
               {
  @@ -252,7 +240,7 @@
               try
               {
                   setState( DECOMMISSIONING );
  -                m_application.decommission();
  +                m_model.decommission();
               }
               catch( Throwable e )
               {
  
  
  
  1.7       +2 -10     avalon/merlin/kernel/servlet/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/servlet/project.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- project.xml	24 Jan 2004 23:25:32 -0000	1.6
  +++ project.xml	10 Feb 2004 16:31:17 -0000	1.7
  @@ -21,7 +21,7 @@
       <dependency>
         <groupId>avalon-meta</groupId>
         <artifactId>avalon-meta-api</artifactId>
  -      <version>1.3</version>
  +      <version>1.4-SNAPSHOT</version>
         <type>jar</type>
         <properties>
           <war.bundle>true</war.bundle>
  @@ -45,15 +45,7 @@
           <war.bundle>true</war.bundle>
         </properties>
       </dependency>
  -    <dependency>
  -      <groupId>avalon-activation</groupId>
  -      <artifactId>avalon-activation-api</artifactId>
  -      <version>2.0-SNAPSHOT</version>
  -      <type>jar</type>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  +
       <dependency>
         <groupId>merlin</groupId>
         <artifactId>merlin-api</artifactId>
  
  
  
  1.6       +1 -1      avalon/merlin/kernel/servlet/src/java/org/apache/avalon/merlin/servlet/MerlinServlet.java
  
  Index: MerlinServlet.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/servlet/src/java/org/apache/avalon/merlin/servlet/MerlinServlet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MerlinServlet.java	25 Jan 2004 13:18:49 -0000	1.5
  +++ MerlinServlet.java	10 Feb 2004 16:31:17 -0000	1.6
  @@ -131,7 +131,7 @@
               System.out.println("kernel established");
   
               getServletContext().setAttribute( 
  -              "merlin-root-block", m_kernel.getBlock() );
  +              "urn:composition:root", m_kernel.getModel() );
           }
           catch( Throwable e )
           {
  
  
  
  1.24      +11 -10    avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/AbstractMerlinTestCase.java
  
  Index: AbstractMerlinTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/AbstractMerlinTestCase.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- AbstractMerlinTestCase.java	24 Jan 2004 23:25:32 -0000	1.23
  +++ AbstractMerlinTestCase.java	10 Feb 2004 16:31:17 -0000	1.24
  @@ -58,8 +58,8 @@
   
       private static final String IMPLEMENTATION_KEY = "merlin.implementation";
   
  -    private static final String APPLICANCE_CLASSNAME = 
  -      "org.apache.avalon.activation.appliance.Appliance";
  +    private static final String DEPLOYMENT_MODEL_CLASSNAME = 
  +      "org.apache.avalon.composition.model.DeploymentModel";
   
       //----------------------------------------------------------
       // immutable state
  @@ -72,6 +72,7 @@
       private Object m_root;
   
       private Method m_locate;
  +    private Method m_runtime;
       private Method m_resolve;
       private Method m_shutdown;
   
  @@ -170,17 +171,17 @@
                   new Class[0] );
               Method method = 
                 m_kernel.getClass().getMethod( 
  -                "getBlock", 
  +                "getModel", 
                   new Class[0] );
               m_root = method.invoke( m_kernel, new Object[0] );
               m_locate = 
                 m_root.getClass().getMethod( 
  -                "locate", 
  +                "getModel", 
                   new Class[]{ String.class } );
  -            Class applianceClass = 
  -              m_classloader.loadClass( APPLICANCE_CLASSNAME );
  +            Class modelClass = 
  +              m_classloader.loadClass( DEPLOYMENT_MODEL_CLASSNAME );
               m_resolve = 
  -              applianceClass.getMethod( "resolve", new Class[0] );
  +              modelClass.getMethod( "resolve", new Class[0] );
           }
           catch( Throwable e )
           {
  @@ -220,8 +221,8 @@
   
           try
           {
  -            Object appliance =  m_locate.invoke( m_root, new Object[]{ path } );
  -            return m_resolve.invoke( appliance, new Object[0] );
  +            Object model =  m_locate.invoke( m_root, new Object[]{ path } );
  +            return m_resolve.invoke( model, new Object[0] );
           }
           catch( InvocationTargetException ite )
           {
  
  
  
  1.7       +1 -1      avalon/merlin/platform/tutorials/lifecycle/activation/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/tutorials/lifecycle/activation/project.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- project.xml	13 Jan 2004 11:41:28 -0000	1.6
  +++ project.xml	10 Feb 2004 16:31:17 -0000	1.7
  @@ -36,7 +36,7 @@
       <dependency>
         <groupId>avalon-meta</groupId>
         <artifactId>avalon-meta-api</artifactId>
  -      <version>1.3</version>
  +      <version>1.4-SNAPSHOT</version>
       </dependency>
     </dependencies>
     
  
  
  

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