avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground BasicComponent.java BasicContext.java DemoManager.java Demonstratable.java EmbeddedDemo.java ExploitationManager.java SimpleComponent.java
Date Thu, 22 Aug 2002 13:43:02 GMT
mcconnell    2002/08/22 06:43:02

  Modified:    assembly build.xml
               assembly/src/java/org/apache/excalibur/merlin
                        DefaultController.java Main.java
               assembly/src/java/org/apache/excalibur/merlin/assembly
                        ContainerManager.java KernelManager.java
                        ProfileRegistry.java ProfileTable.java
                        UnresolvedManagerException.java
                        UnresolvedProviderException.java
               assembly/src/java/org/apache/excalibur/merlin/container
                        Container.java ContainerListener.java
                        ContainerService.java DefaultContainer.java
                        StateEvent.java StateListener.java
                        StructuralExtension.java
               assembly/src/java/org/apache/excalibur/merlin/kernel
                        DefaultKernel.java Kernel.java
               assembly/src/java/org/apache/excalibur/merlin/model/builder
                        ContainerBuilder.java ContainerCreator.java
                        ProfileBuilder.java ProfileCreator.java
                        XMLContainerCreator.java XMLProfileCreator.java
               assembly/src/java/org/apache/excalibur/playground
                        BasicComponent.java BasicContext.java
                        DemoManager.java Demonstratable.java
                        EmbeddedDemo.java ExploitationManager.java
                        SimpleComponent.java
  Log:
  checkstyle ok
  
  Revision  Changes    Path
  1.50      +1 -1      jakarta-avalon-excalibur/assembly/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/build.xml,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- build.xml	21 Aug 2002 23:19:35 -0000	1.49
  +++ build.xml	22 Aug 2002 13:43:01 -0000	1.50
  @@ -193,7 +193,7 @@
       <!-- Creates all the Javadocs -->
       <target name="javadocs" depends="compile" description="Generates the javadocs" unless="skip.javadocs">
           <mkdir dir="${build.javadocs}"/>
  -        <javadoc packagenames="org.apache.*"
  +        <javadoc packagenames="org.apache.excalibur.merlin.*"
               sourcepath="${java.dir}"
               destdir="${build.javadocs}">
               <classpath refid="project.class.path" />
  
  
  
  1.17      +26 -25    jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/DefaultController.java
  
  Index: DefaultController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/DefaultController.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- DefaultController.java	18 Aug 2002 04:20:09 -0000	1.16
  +++ DefaultController.java	22 Aug 2002 13:43:01 -0000	1.17
  @@ -16,28 +16,11 @@
   import org.apache.avalon.framework.activity.Startable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
  -import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.excalibur.merlin.assembly.TypeManager;
  -import org.apache.excalibur.merlin.assembly.ContainerManager;
  -import org.apache.excalibur.merlin.model.ContainerDescriptor;
  -import org.apache.excalibur.merlin.kernel.Kernel;
  -import org.apache.excalibur.merlin.assembly.ContainerManager;
   import org.apache.excalibur.merlin.kernel.DefaultKernel;
  -import org.apache.excalibur.merlin.kernel.KernelException;
  -import org.apache.excalibur.merlin.model.builder.XMLContainerUtil;
  -import org.apache.excalibur.merlin.model.Resource;
  -import org.apache.excalibur.merlin.model.CategoriesDescriptor;
  -import org.apache.excalibur.merlin.model.ClasspathDescriptor;
  -import org.apache.excalibur.merlin.model.LibraryDescriptor;
  -import org.apache.excalibur.merlin.model.LoggingDescriptor;
  -
   
   /**
    * <p>The <code>DefaultController</code> provides support for the establishment
  @@ -94,7 +77,14 @@
       private static final int STOPPED = 3;
       private static final int DISPOSED = 4;
   
  +   /**
  +    * The context key to retieve the path to the kernel configuration.
  +    */
       public static final String PATH_KEY = "merlin:path";
  +
  +   /**
  +    * The base directory context key.
  +    */
       public static final String DIR_KEY = "avalon:home";
   
       //=======================================================================
  @@ -162,7 +152,9 @@
       public void initialize() throws Exception
       {
           if( m_status < CONTEXTUALIZED )
  -          throw new ControllerException( "Controller has not been contextualized." );
  +        {
  +            throw new ControllerException( "Controller has not been contextualized." );
  +        }
   
           final File file = new File( m_home, m_path );
           if( !file.exists() )
  @@ -221,19 +213,28 @@
      /**
       * Invoked by a contrainer to request startup of the controller.  Thie implementation
       * simply invokes the {@link #start} operation.
  +    * @exception Exception if a startup error occurs
       */
       public void start() throws Exception
       {
           if( m_status < INITIALIZED )
  -          throw new ControllerException( "Controller has not been initialized." );
  +        {
  +            throw new ControllerException( "Controller has not been initialized." );
  +        }
           if( m_status > STARTED )
           {
               if( m_status < STOPPED )
  -              throw new ControllerException( "Controller already running." );
  +            {
  +                throw new ControllerException( "Controller already running." );
  +            }
               if( m_status == STOPPED )
  -              throw new ControllerException( "Controller was stopped." );
  +            {
  +                throw new ControllerException( "Controller was stopped." );
  +            }
               if( m_status == DISPOSED )
  -              throw new ControllerException( "Controller was disposed." );
  +            {
  +                throw new ControllerException( "Controller was disposed." );
  +            }
           }
           m_kernel.start();
           m_status = STARTED;
  @@ -242,6 +243,7 @@
      /**
       * Invoked by a contrainer to request shutdown of the controller.  Thie implementation
       * simply invokes the {@link #stop} operation.
  +    * @exception Exception if a shutdown error occurs
       */
       public void stop() throws Exception
       {
  @@ -264,8 +266,7 @@
       {
           if( m_kernel != null )
           {
  -            m_kernel.dispose();
  -            
  +            m_kernel.dispose();            
           }
           m_status = DISPOSED;
       }
  
  
  
  1.15      +2 -52     jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/Main.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Main.java	18 Aug 2002 04:20:09 -0000	1.14
  +++ Main.java	22 Aug 2002 13:43:01 -0000	1.15
  @@ -8,61 +8,10 @@
   
   package org.apache.excalibur.merlin;
   
  -import java.io.InputStream;
   import java.io.File;
  -import java.io.IOException;
  -import java.net.URL;
  -import java.net.JarURLConnection;
  -import java.net.URLClassLoader;
  -import java.util.List;
  -import java.util.LinkedList;
  -import java.util.Map;
  -import java.util.Hashtable;
  -import java.util.Properties;
  -import java.util.Vector;
  -import java.util.Iterator;
  -import java.util.jar.Attributes;
  -import java.util.jar.Manifest;
  -import java.security.Policy;
  -import java.io.FileInputStream;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.excalibur.configuration.ConfigurationUtil;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.AvalonFormatter;
  -import org.apache.avalon.framework.logger.LogKitLogger;
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.activity.Executable;
  -import org.apache.avalon.framework.CascadingRuntimeException;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.DefaultConfiguration;
  -import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
  -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.Serviceable;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
  -import org.apache.avalon.framework.service.ServiceException;
  -import org.apache.avalon.framework.Version;
   import org.apache.avalon.framework.ExceptionUtil;
  -import org.apache.excalibur.meta.info.Type;
  -import org.apache.excalibur.meta.info.ServiceDescriptor;
  -import org.apache.excalibur.meta.info.DependencyDescriptor;
  -import org.apache.excalibur.meta.info.ReferenceDescriptor;
  -import org.apache.excalibur.merlin.assembly.ContainerManager;
  -import org.apache.excalibur.merlin.model.ContainerDescriptor;
  -import org.apache.excalibur.merlin.model.ClasspathDescriptor;
  -import org.apache.excalibur.merlin.model.LibraryDescriptor;
  -import org.apache.excalibur.merlin.model.LoggingDescriptor;
  -import org.apache.excalibur.merlin.kernel.DefaultKernel;
  -import org.apache.excalibur.merlin.kernel.KernelException;
   
   /**
    * <p>Utility class supporting the establishment of a new <code>Controller</code>
  @@ -131,6 +80,7 @@
      /**
       * Entry point for command line based creation of a new <code>Controller</code> 
       * instance.
  +    * @param args the command line arguments
       */
       public static void main( String[] args )
       {
  
  
  
  1.25      +3 -3      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java
  
  Index: ContainerManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ContainerManager.java	22 Aug 2002 05:50:50 -0000	1.24
  +++ ContainerManager.java	22 Aug 2002 13:43:01 -0000	1.25
  @@ -30,7 +30,7 @@
   import org.apache.excalibur.merlin.model.ContainerDescriptor;
   import org.apache.excalibur.merlin.model.ClasspathDescriptor;
   import org.apache.excalibur.merlin.model.LoggingDescriptor;
  -import org.apache.excalibur.merlin.model.builder.XMLContainerUtil;
  +import org.apache.excalibur.merlin.model.builder.XMLContainerCreator;
   import org.apache.excalibur.merlin.model.CategoriesDescriptor;
   import org.apache.excalibur.merlin.model.Profile;
   import org.apache.excalibur.merlin.model.Resource;
  @@ -276,7 +276,7 @@
           m_deployment = new DeploymentHelper( getLoggingManager(), this );
           m_deployment.enableLogging( getLocalLogger().getChildLogger("deployment") );
   
  -        XMLContainerUtil creator = new XMLContainerUtil();
  +        XMLContainerCreator creator = new XMLContainerCreator();
   
           getLogger().debug(
             "creating manager '" + m_name 
  
  
  
  1.5       +2 -2      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/KernelManager.java
  
  Index: KernelManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/KernelManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- KernelManager.java	22 Aug 2002 09:45:42 -0000	1.4
  +++ KernelManager.java	22 Aug 2002 13:43:01 -0000	1.5
  @@ -111,7 +111,7 @@
      /**
       * Returns the singleton logging manager.  If the is the root manager
       * the logging manager is returned directly, otherwise, request are 
  -    * delegated to the partner manager. 
  +    * delegated to the parent manager. 
       * @return the logging manager
       */
       protected DefaultLoggerManager getLoggingManager()
  
  
  
  1.15      +40 -35    jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ProfileRegistry.java
  
  Index: ProfileRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ProfileRegistry.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ProfileRegistry.java	21 Aug 2002 17:00:51 -0000	1.14
  +++ ProfileRegistry.java	22 Aug 2002 13:43:01 -0000	1.15
  @@ -8,31 +8,15 @@
   package org.apache.excalibur.merlin.assembly;
   
   import java.util.List;
  -import java.util.Map;
   import java.util.ArrayList;
  -import java.util.LinkedList;
  -import java.util.Hashtable;
  -import java.util.ArrayList;
  -import java.util.Vector;
  -import java.util.Iterator;
  -import org.apache.avalon.framework.CascadingException;
  -import org.apache.avalon.framework.activity.Startable;
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.excalibur.meta.info.ServiceDescriptor;
   import org.apache.excalibur.meta.info.ReferenceDescriptor;
   import org.apache.excalibur.meta.info.DependencyDescriptor;
   import org.apache.excalibur.meta.info.StageDescriptor;
  -import org.apache.excalibur.meta.info.Type;
   import org.apache.excalibur.merlin.model.Profile;
   import org.apache.excalibur.merlin.model.Resource;
   import org.apache.excalibur.merlin.resource.ResourceException;
  -import org.apache.excalibur.merlin.resource.DefaultResource;
   
   /**
    * Internal table that holds available component type keyed relative
  @@ -83,13 +67,16 @@
      /**
       * Initiate dependency correlation for the supplied profile.
       *
  -    * @param map the dependency graph containing candidates and into which asembled
  -    *   profiles will be added
  +    * @param map the dependency graph containing candidates and into which 
  +    *   asembled profiles will be added
       * @param profile the profile to assemble
       * @param context supplimentary context
  +    * @return the assembled resource
       * @exception AssemblyException if an error occurs during assembly
       */
  -    public Resource assembleProfile( DependencyGraph map, Profile profile, Context context ) throws AssemblyException
  +    public Resource assembleProfile( 
  +      DependencyGraph map, Profile profile, Context context ) 
  +      throws AssemblyException
       {
           return assembleProfile( map, profile, context, new ArrayList() );
       }
  @@ -97,13 +84,17 @@
      /**
       * Initiate dependency correlation for the supplied profile.
       *
  -    * @param map the dependency graph containing candidates and into which asembled
  -    *   profiles will be added
  +    * @param map the dependency graph containing candidates and into 
  +    *   which asembled profiles will be added
       * @param profile the profile to assemble
       * @param context supplimentary context
  +    * @param visited list of visited profiles
  +    * @return the assembled resource
       * @exception AssemblyException if an error occurs during assembly
       */
  -    private Resource assembleProfile( DependencyGraph map, Profile profile, Context context, List visited ) throws AssemblyException
  +    private Resource assembleProfile( 
  +      DependencyGraph map, Profile profile, Context context, List visited ) 
  +      throws AssemblyException
       {
           getLogger().debug("assembly target: " + profile );
           assembleProfile( map, profile, context, visited, "" );
  @@ -115,7 +106,8 @@
           }
           catch( ResourceException e )
           {
  -            final String error = "Unable to assemble profile '" + profile.getName() + "'.";
  +            final String error = 
  +              "Unable to assemble profile '" + profile.getName() + "'.";
               throw new AssemblyException( error, e );
           }
       }
  @@ -129,9 +121,11 @@
       * @param map the dependency graph containing candidates and into which asemble
       *   profiles will be added
       * @param profiles the set of profiles to assemble
  -    * @exception Exception if an error occurs during assembly
  +    * @param context supplimentary context
  +    * @exception AssemblyException if an error occurs during assembly
       */
  -    public void assemble( DependencyGraph map, Profile[] profiles, Context context ) throws AssemblyException
  +    public void assemble( DependencyGraph map, Profile[] profiles, Context context ) 
  +      throws AssemblyException
       {
           for( int i=0; i<profiles.length; i++ )
           {
  @@ -149,7 +143,8 @@
               }
               catch( ResourceException e )
               {
  -                final String error = "Unable to assemble profile '" + profile.getName() + "'.";
  +                final String error = 
  +                  "Unable to assemble profile '" + profile.getName() + "'.";
                   throw new AssemblyException( error, e );
               }
           }
  @@ -158,6 +153,7 @@
      /**
       * Returns the set of component types know to the registry that are capable of 
       * supporting the supplied service.
  +    * @param service a service reference descriptor
       * @return the set of candidate component types
       */
       Profile[] getProfiles( ReferenceDescriptor service )
  @@ -168,6 +164,7 @@
      /**
       * Returns the set of component types know to the registry that are capable of 
       * supporting the supplied phase.
  +    * @param phase a stage descriptor
       * @return the set of candidate component types
       */
       Profile[] getProfiles( StageDescriptor phase )
  @@ -184,7 +181,8 @@
       * @param pad used in formatting log messages
       */
       private void assembleProfile( 
  -      DependencyGraph map, Profile profile, Context context, List visited, String pad ) throws AssemblyException
  +      DependencyGraph map, Profile profile, Context context, List visited, String pad ) 
  +      throws AssemblyException
       {
           getLogger().debug( pad + "assemble: " + profile );
           String pad2 = pad + "  ";
  @@ -211,7 +209,8 @@
                   // have at least one solution
                   //
   
  -                boolean ok = assembleProviders( map, profile, context, dependency, visited, pad2 );
  +                boolean ok = 
  +                  assembleProviders( map, profile, context, dependency, visited, pad2 );
                   if( !ok )
                   {
                       final String message =
  @@ -240,7 +239,8 @@
                       getLogger().error( pad + "  " + message );
   
                       profile.setEnabled( false );
  -                    final Exception problem = new Exception( "No suitable candidates." );
  +                    final Exception problem = 
  +                      new Exception( "No suitable candidates." );
                       throw new UnresolvedProviderException( dependency, problem );
                   }
   
  @@ -280,10 +280,12 @@
               StageDescriptor phase = phases[i];
               if( profile.getExtension( phase ) == null )
               {
  -                boolean ok = assembleManagers( map, profile, context, phase, visited, pad2 );
  +                boolean ok = 
  +                  assembleManagers( map, profile, context, phase, visited, pad2 );
                   if( !ok )
                   {
  -                    final String message = "Could not locate an extension for the phase: " 
  +                    final String message = 
  +                      "Could not locate an extension for the phase: " 
                         + phase.getReference() + ", in profile: " + profile;
                       getLogger().error( pad + "  " + message );
   
  @@ -306,7 +308,8 @@
                       getLogger().error( pad + "  " + message );
   
                       profile.setEnabled( false );
  -                    final AssemblyException problem = new AssemblyException( message );
  +                    final AssemblyException problem = 
  +                      new AssemblyException( message );
                       throw new UnresolvedManagerException( phase, problem );
                   }
   
  @@ -336,7 +339,8 @@
       }
   
       private boolean assembleManagers( 
  -      DependencyGraph map, Profile source, Context context, StageDescriptor phase, List visited, String pad )
  +      DependencyGraph map, Profile source, Context context, StageDescriptor phase, 
  +      List visited, String pad )
         throws AssemblyException
       {
           boolean ok = false;
  @@ -372,7 +376,8 @@
       }
   
       private boolean assembleProviders( 
  -      DependencyGraph map, Profile source, Context context, DependencyDescriptor dependency, List visited, String pad )
  +      DependencyGraph map, Profile source, Context context, 
  +      DependencyDescriptor dependency, List visited, String pad )
         throws AssemblyException
       {
           boolean ok = false;
  
  
  
  1.2       +1 -4      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ProfileTable.java
  
  Index: ProfileTable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ProfileTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProfileTable.java	29 Jul 2002 06:14:29 -0000	1.1
  +++ ProfileTable.java	22 Aug 2002 13:43:01 -0000	1.2
  @@ -9,10 +9,7 @@
   
   import java.util.List;
   import java.util.LinkedList;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.excalibur.meta.info.ReferenceDescriptor;
  -import org.apache.excalibur.meta.info.Type;
   import org.apache.excalibur.merlin.model.Profile;
   
   /**
  
  
  
  1.4       +1 -3      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/UnresolvedManagerException.java
  
  Index: UnresolvedManagerException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/UnresolvedManagerException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UnresolvedManagerException.java	21 Aug 2002 17:00:51 -0000	1.3
  +++ UnresolvedManagerException.java	22 Aug 2002 13:43:01 -0000	1.4
  @@ -10,8 +10,6 @@
   
   import org.apache.excalibur.meta.info.StageDescriptor;
   
  -import org.apache.avalon.framework.CascadingException;
  -
   /**
    * Exception to indicate that a service provider could not be found.
    *
  
  
  
  1.3       +1 -4      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/UnresolvedProviderException.java
  
  Index: UnresolvedProviderException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/UnresolvedProviderException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UnresolvedProviderException.java	12 Aug 2002 02:00:09 -0000	1.2
  +++ UnresolvedProviderException.java	22 Aug 2002 13:43:01 -0000	1.3
  @@ -10,8 +10,6 @@
   
   import org.apache.excalibur.meta.info.DependencyDescriptor;
   
  -import org.apache.avalon.framework.CascadingException;
  -
   /**
    * Exception to indicate that a service provider could not be found.
    *
  @@ -19,7 +17,6 @@
    * @version $Revision$ $Date$
    */
   public final class UnresolvedProviderException
  -    //extends CascadingException
       extends AssemblyException
   {
   
  
  
  
  1.15      +6 -6      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/Container.java
  
  Index: Container.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/Container.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Container.java	22 Aug 2002 10:25:23 -0000	1.14
  +++ Container.java	22 Aug 2002 13:43:01 -0000	1.15
  @@ -67,32 +67,32 @@
      /**
       * Context key used to locate the container manager.
       */
  -    public static final String MANAGER_KEY = "merlin:container.manager";
  +    static final String MANAGER_KEY = "merlin:container.manager";
   
      /**
       * Context key used to locate the container descriptor.
       */
  -    public static final String DESCRIPTOR_KEY = "merlin:container.descriptor";
  +    static final String DESCRIPTOR_KEY = "merlin:container.descriptor";
   
      /**
       * Context key used to locate a state listener.
       */
  -    public static final String STATE_LISTENER_KEY = "merlin:container.state-listener";
  +    static final String STATE_LISTENER_KEY = "merlin:container.state-listener";
   
      /**
       * Context key used to locate a content listener.
       */
  -    public static final String CONTAINER_LISTENER_KEY = "merlin:container.container-listener";
  +    static final String CONTAINER_LISTENER_KEY = "merlin:container.container-listener";
   
      /**
       * Context key used to locate the logging manager.
       */
  -    public static final String LOGGING_KEY = "merlin:container.logging";
  +    static final String LOGGING_KEY = "merlin:container.logging";
   
      /**
       * Context key used to locate the container services map for subsidiary containers.
       */
  -    public static final String SERVICES_KEY = "merlin:container.services";
  +    static final String SERVICES_KEY = "merlin:container.services";
   
      /**
       * Return the container name.
  
  
  
  1.2       +5 -2      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerListener.java
  
  Index: ContainerListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerListener.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContainerListener.java	4 Aug 2002 06:43:20 -0000	1.1
  +++ ContainerListener.java	22 Aug 2002 13:43:01 -0000	1.2
  @@ -12,14 +12,17 @@
   /**
    * A <code>ContainerListener</code> listens to <code>ContainerEvent</code> events
    * singnalling the addition and removal of containers from a source container.
  + *
  + * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
  + * @version $Revision$ $Date$
    */
  -
   public interface ContainerListener
   {
   
      /**
       * Method invoked when a container is added or removed from a container.
  +    * @param event the container event 
       */
  -    public void structuralChange( ContainerEvent event );
  +    void structuralChange( ContainerEvent event );
   
   }
  
  
  
  1.4       +26 -5     jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerService.java
  
  Index: ContainerService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContainerService.java	13 Aug 2002 03:57:56 -0000	1.3
  +++ ContainerService.java	22 Aug 2002 13:43:01 -0000	1.4
  @@ -9,7 +9,6 @@
   package org.apache.excalibur.merlin.container;
   
   import java.util.Map;
  -import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.excalibur.merlin.assembly.DefaultLoggerManager;
   import org.apache.excalibur.merlin.assembly.ContainerManager;
  @@ -54,27 +53,40 @@
       private Resource m_resource;
      
      /**
  -    * Creation of a new container service.
  +    * Creation of a new container service instance.
  +    * @param logging the singleton logging manager
       * @param descriptor the container descriptor
       * @param manager the container manager
  +    * @param services a map of subsidiary services
  +    * @exception NullPointerException if the descriptor, manager, logging 
  +    *   or services argument is null
       */
       public ContainerService( 
                        DefaultLoggerManager logging,
                        ContainerDescriptor descriptor, 
                        ContainerManager manager, 
                        Map services )
  +      throws NullPointerException
       {
           if( descriptor == null ) 
  +        {
             throw new NullPointerException( "descriptor" );
  +        }
   
           if( manager == null ) 
  +        {
             throw new NullPointerException( "manager" );
  +        }
   
           if( logging == null ) 
  +        {
             throw new NullPointerException( "logging" );
  +        }
   
           if( services == null ) 
  +        {
             throw new NullPointerException( "services" );
  +        }
   
           m_descriptor = descriptor;
           m_manager = manager;
  @@ -103,6 +115,8 @@
      /**
       * Returns the container as a resource reference.
       * @return the container as a resource reference
  +    * @exception AssemblyException if an error occurs while attempting to 
  +    *   assemble the container
       */
       public Resource getResource()
         throws AssemblyException
  @@ -114,6 +128,8 @@
       * Returns the container as a resource reference.
       * @param listener a state listener to assign to the container
       * @return the container as a resource reference
  +    * @exception AssemblyException if an error occurs while attempting to 
  +    *   assemble the container
       */
       public Resource getResource( StateListener listener )
         throws AssemblyException
  @@ -126,8 +142,11 @@
       * @param stateListener a state listener to assign to the container
       * @param containerListener a container listener to assign to the container
       * @return the container as a resource reference
  +    * @exception AssemblyException if an error occurs while attempting to 
  +    *   assemble the container
       */
  -    public Resource getResource( StateListener stateListener, ContainerListener containerListener )
  +    public Resource getResource( StateListener stateListener, 
  +      ContainerListener containerListener )
         throws AssemblyException
       {
           //
  @@ -159,7 +178,9 @@
           }
           catch( Throwable e )
           {
  -            final String error = "Error during assembly of subsidiary container: " + m_manager.getPath();
  +            final String error = 
  +              "Error during assembly of subsidiary container: " 
  +              + m_manager.getPath();
               throw new AssemblyException( error, e );
           }
       }
  
  
  
  1.34      +130 -95   jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java
  
  Index: DefaultContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- DefaultContainer.java	20 Aug 2002 23:23:08 -0000	1.33
  +++ DefaultContainer.java	22 Aug 2002 13:43:01 -0000	1.34
  @@ -8,75 +8,33 @@
   
   package org.apache.excalibur.merlin.container;
   
  -import java.io.InputStream;
  -import java.io.File;
  -import java.io.IOException;
  -import java.net.URL;
  -import java.net.JarURLConnection;
  -import java.net.URLClassLoader;
   import java.util.Map;
   import java.util.List;
   import java.util.LinkedList;
  -import java.util.Hashtable;
  -import java.util.Properties;
   import java.util.ArrayList;
  -import java.util.Vector;
   import java.util.Iterator;
  -import java.util.jar.Attributes;
  -import java.util.jar.Manifest;
  -import java.security.Policy;
  -import java.io.FileInputStream;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.excalibur.configuration.ConfigurationUtil;
  -import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.AvalonFormatter;
  -import org.apache.avalon.framework.logger.LogKitLogger;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.activity.Executable;
   import org.apache.avalon.framework.activity.Startable;
   import org.apache.avalon.framework.activity.Suspendable;
  -import org.apache.avalon.framework.CascadingRuntimeException;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.DefaultConfiguration;
  -import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.parameters.Parameters;
   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.Serviceable;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
  -import org.apache.avalon.framework.service.ServiceException;
  -import org.apache.avalon.framework.Version;
  -import org.apache.excalibur.meta.info.Type;
  -import org.apache.excalibur.meta.info.ServiceDescriptor;
  -import org.apache.excalibur.meta.info.DependencyDescriptor;
  -import org.apache.excalibur.meta.info.ReferenceDescriptor;
  -import org.apache.excalibur.merlin.assembly.TypeManager;
   import org.apache.excalibur.merlin.assembly.AssemblyException;
  -import org.apache.excalibur.merlin.assembly.TypeException;
   import org.apache.excalibur.merlin.assembly.ContainerManager;
   import org.apache.excalibur.merlin.assembly.DefaultLoggerManager;
   import org.apache.excalibur.merlin.assembly.DependencyGraph;
  -import org.apache.excalibur.merlin.container.Container;
   import org.apache.excalibur.merlin.model.ContainerDescriptor;
   import org.apache.excalibur.merlin.model.ClasspathDescriptor;
   import org.apache.excalibur.merlin.model.Profile;
   import org.apache.excalibur.merlin.model.Resource;
  -import org.apache.excalibur.merlin.model.ContextDirective;
  -import org.apache.excalibur.merlin.model.CategoriesDescriptor;
  -import org.apache.excalibur.merlin.model.builder.XMLContainerUtil;
   import org.apache.excalibur.merlin.model.builder.XMLContainerCreator;
  -import org.apache.excalibur.merlin.model.builder.ContainerBuilder;
  -import org.apache.excalibur.merlin.Controller;
  -import org.apache.excalibur.configuration.ConfigurationUtil;
   
   /**
    * Default container implementation that manages a registry of componet providers and 
  @@ -87,7 +45,9 @@
    * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    * @version $Revision$ $Date$
    */
  -public class DefaultContainer extends AbstractLogEnabled implements Container, Contextualizable, Configurable, Structural, Initializable, Startable, Suspendable, Disposable, Runnable, StateListener
  +public class DefaultContainer extends AbstractLogEnabled implements Container, 
  +  Contextualizable, Configurable, Structural, Initializable, Startable, Suspendable, 
  +  Disposable, Runnable, StateListener
   {
       //=======================================================================
       // static
  @@ -184,13 +144,14 @@
       *  <li>{@link #SERVICES_KEY} the container services 
       *         {@link Map} (REQUIRED}</li>
       *  <li>{@link #LOGGING_KEY} the logging manager 
  -              {@link DefaultLoggerManager} (REQUIRED}</li>
  +    *          {@link DefaultLoggerManager} (REQUIRED}</li>
       *  <li>{@link #STATE_LISTENER_KEY} a container state listener 
  -              {@link StateListener} (OPTIONAL}</li>
  +    *          {@link StateListener} (OPTIONAL}</li>
       *  <li>{@link #CONTAINER_LISTENER_KEY} a container container listener 
  -              {@link ContainerListener} (OPTIONAL}</li>
  +    *          {@link ContainerListener} (OPTIONAL}</li>
       * </ul>
  -    * @param context the service context value 
  +    * @param context the service context value
  +    * @exception ContextException if a contextualization error occurs 
       */
       public void contextualize( Context context ) throws ContextException
       {
  @@ -250,7 +211,7 @@
       * is supplied.  Each contiguration instance represents the configuration of 
       * a subsidiary container to be hosted within this container.
       * 
  -    * @param assembly the subsidiary container configurations
  +    * @exception AssemblyException if a content assembly failure occurs
       */
       public void assemble( ) throws AssemblyException
       {
  @@ -314,11 +275,14 @@
       * Invoked by the parent to initiate the thread after which the thread will 
       * monitor action requests arrising from initialize, startup, shutdown and dispose
       * requests.
  +    * @exception IllegalStateException if the container has not been contextualized
       */
  -    public void run()
  +    public void run() throws IllegalStateException
       {
           if( m_manager == null )
  +        {
             throw new IllegalStateException("Container has not been contextualized.");
  +        }
           Thread.currentThread().setContextClassLoader( m_manager );
           try
           {
  @@ -343,11 +307,15 @@
                                    break;
                                case SUSPENDED:
                                    if( m_state == STARTED )
  -                                   handleSuspend();
  +                                 {
  +                                     handleSuspend();
  +                                 }
                                    break;
                                case STOPPED:
                                    if(( m_state == STARTED ) || ( m_state == SUSPENDED )) 
  -                                   handleShutdown();
  +                                 {
  +                                     handleShutdown();
  +                                 }
                                    break;
                           }
                       }
  @@ -369,11 +337,14 @@
       * Implementation of the initialization method.  Initialization is handled after
       * a thread is established so that we can assign the manager as the thread context 
       * classloader.
  +    * @exception Exception if an error occurs during the initialization phase
       */
       public void handleInitialize() throws Exception
       {
           if( m_state >= INITIALIZED ) 
  -          return;
  +        {
  +            return;
  +        }
   
           //
           // creation of the subsidiary containers
  @@ -407,6 +378,7 @@
   
      /**
       * Request the startup of the container.
  +    * @exception Exception if an error occurs during the startup phase
       */
       public void start() throws Exception
       {
  @@ -453,8 +425,10 @@
       public void resume()
       {
           if( m_state != SUSPENDED )
  -          throw new IllegalStateException(
  -            "Container is not suspended.");
  +        {
  +            throw new IllegalStateException(
  +              "Container is not suspended.");
  +        }
   
           synchronized( this )
           {
  @@ -475,6 +449,7 @@
   
      /**
       * Request the shutdown of the container.
  +    * @exception Exception if an error occurs during the shutdown phase
       */
       public void stop() throws Exception
       {
  @@ -497,19 +472,26 @@
      /**
       * Implementation of the container startup procedure. This is invoked ONCE 
       * during the lifetime of the container.
  +    * @exception Exception if an error occurs during the startup phase
       */
       private void handleStartup() throws Exception
       {
           if( m_state < INITIALIZED )
  +        {
             throw new IllegalStateException(
               "Container has not been initialized.");
  +        }
   
           if( m_state == STARTED )
  +        {
             return;
  +        }
   
           if( m_state > STARTED )
  +        {
             throw new IllegalStateException(
               "Container has already passed through start phase.");
  +        }
   
           //
           // request startup of any unstarted components
  @@ -546,16 +528,24 @@
       public void handleShutdown()
       {
           if( m_state < STARTED )
  -          return;
  +        {
  +            return;
  +        }
   
           if( m_state == STOPPED )
  -          return;
  +        {
  +            return;
  +        }
   
           if( m_state > STOPPED )
  -          throw new IllegalStateException("Already stopped.");
  +        { 
  +            throw new IllegalStateException("Already stopped.");
  +        }
   
           if( getLogger().isDebugEnabled() )
  -          getLogger().debug("container shutdown");
  +        {
  +            getLogger().debug("container shutdown");
  +        }
   
           //
           // shutdown all of the nested containers before stopping 
  @@ -600,18 +590,26 @@
       private void handleSuspend()
       {
           if( m_state < INITIALIZED )
  +        {
             throw new IllegalStateException(
               "Container has not been initialized.");
  +        }
   
           if( m_state == SUSPENDED )
  +        {
             return;
  +        }
   
           if( m_state > STOPPED )
  +        {
             throw new IllegalStateException(
               "Container has been stopped.");
  +        }
   
           if( getLogger().isDebugEnabled() )
  +        {
             getLogger().debug("container suspension");
  +        }
   
           synchronized( m_containers )
           {
  @@ -627,7 +625,9 @@
               }
   
               while( !hasAchievedState( SUSPENDED ) )
  +            {
                 sleep();
  +            }
           }
   
           getLogger().debug("container suspension complete");
  @@ -638,11 +638,15 @@
       private void handleResume()
       {
           if( m_state != SUSPENDED )
  +        {
             throw new IllegalStateException(
               "Container is not suspended.");
  +        }
   
           if( getLogger().isDebugEnabled() )
  +        {
             getLogger().debug("container resuming");
  +        }
   
           //
           // re-apply start to the manager
  @@ -677,7 +681,9 @@
               }
   
               while( !hasAchievedState( STARTED ) )
  +            {
                 sleep();
  +            }
           }
   
           getLogger().debug("container resumption complete");
  @@ -693,6 +699,7 @@
       * Method invoked when the root container state changes.  When subsidiary
       * containers transition to intialized state they will be published
       * by this container under a {@link ContainerEvent} event.
  +    * @param event the event norifying us of a subsidiary container state change
       */
       public void stateChanged( StateEvent event )
       {
  @@ -746,44 +753,48 @@
   
      /**
       * Adds a <code>StateListener</code>.
  +    * @param listener the state listener to add 
       */
       protected void addStateListener( StateListener listener )
       {
  -	  synchronized( m_stateListeners )
  -	  {
  +        synchronized( m_stateListeners )
  +        {
               m_stateListeners.add( listener );
           }
       }
   
      /**
       * Removes a <code>StateListener</code>.
  +    * @param listener the state listener to remove 
       */
       protected void removeStateListener( StateListener listener )
       {
  -	  synchronized( m_stateListeners )
  -	  {
  +        synchronized( m_stateListeners )
  +        {
               m_stateListeners.remove( listener );
           }
       }
   
      /**
       * Adds a <code>ContainerListener</code>.
  +    * @param listener the container listener to add 
       */
       protected void addContainerListener( ContainerListener listener )
       {
  -	  synchronized( m_containerListeners )
  -	  {
  +        synchronized( m_containerListeners )
  +        {
               m_containerListeners.add( listener );
           }
       }
   
      /**
       * Removes a <code>ContainerListener</code>.
  +    * @param listener the container listener to remove 
       */
       protected void removeContainerListener( ContainerListener listener )
       {
  -	  synchronized( m_containerListeners )
  -	  {
  +        synchronized( m_containerListeners )
  +        {
               m_containerListeners.remove( listener );
           }
       }
  @@ -796,7 +807,9 @@
       public Resource[] getResources()
       {
           if( m_state < INITIALIZED )
  +        {
             throw new IllegalStateException("not-initialized");
  +        }
   
           ArrayList list = new ArrayList();
           Resource[] local = m_manager.getExport();
  @@ -815,7 +828,9 @@
                   {
                       Resource resource = resources[j];
                       if( !list.contains( resource ) )
  +                    {
                         list.add( resources[j] );
  +                    }
                   }
               }
           }
  @@ -843,8 +858,13 @@
       public void install( Profile[] profiles ) throws Exception
       {
           if( m_state != SUSPENDED )
  -          if( m_state != INITIALIZED )
  -            throw new IllegalStateException( "Container not in suspended or initialized state." );
  +        {
  +            if( m_state != INITIALIZED )
  +            {
  +                throw new IllegalStateException( 
  +                  "Container not in suspended or initialized state." );
  +            }
  +        }
   
           //
           // Add the supplied profiles to this container
  @@ -893,6 +913,7 @@
   
      /**
       * Handle disposal of the container.
  +    * @param error a possible null throwable trigggering the disposal
       */
       private void handleDispose( Throwable error )
       {
  @@ -949,27 +970,29 @@
       protected void fireStateChange( StateEvent event )
       {
           synchronized( m_stateListeners )
  -	  {
  +        {
               StateListener[] listeners = 
                 (StateListener[]) m_stateListeners.toArray( new StateListener[0] );
               for( int i=0; i<listeners.length; i++ )
               {
                   StateListener listener = listeners[i];
  -		    try
  -		    {
  -	  	        listener.stateChanged( event );
  +                try
  +                {
  +                      listener.stateChanged( event );
                   }
  -		    catch( Exception e )
  -		    {
  +                catch( Exception e )
  +                {
                       m_stateListeners.remove( listener );
  -			  final String warning = 
  +                    final String warning = 
                         "State listener raised on error on notification. Removing listener: "
                         + listener;
  -			  if( getLogger().isWarnEnabled() ) 
  -                      getLogger().warn( warning );
  -		    }
  -	      }
  -	  }
  +                    if( getLogger().isWarnEnabled() ) 
  +                    {
  +                        getLogger().warn( warning );
  +                    }
  +                }
  +            }
  +        }
       }
   
   
  @@ -980,27 +1003,29 @@
       protected void fireStructuralChange( ContainerEvent event )
       {
           synchronized( m_containerListeners )
  -	  {
  +        {
               ContainerListener[] listeners = 
                 (ContainerListener[]) m_containerListeners.toArray( new ContainerListener[0] );
               for( int i=0; i<listeners.length; i++ )
               {
                   ContainerListener listener = listeners[i];
  -		    try
  -		    {
  -	  	        listener.structuralChange( event );
  +                try
  +                {
  +                      listener.structuralChange( event );
                   }
  -		    catch( Exception e )
  -		    {
  +                catch( Exception e )
  +                {
                       m_containerListeners.remove( listener );
  -			  final String warning = 
  +                    final String warning = 
                         "Container listener raised on error on notification. Removing listener: "
                         + listener;
  -			  if( getLogger().isWarnEnabled() ) 
  -                      getLogger().warn( warning );
  -		    }
  -	      }
  -	  }
  +                    if( getLogger().isWarnEnabled() )
  +                    { 
  +                        getLogger().warn( warning );
  +                    }
  +                }
  +            }
  +        }
       }
   
      /**
  @@ -1008,6 +1033,7 @@
       * using the default container type and an empty classpath.
       *
       * @param name the name to assign to the new container
  +    * @return the new container
       * @exception Exception is an error occurs
       */
       public Container addContainer( String name ) 
  @@ -1023,6 +1049,7 @@
       *
       * @param name the name to assign to the new container
       * @param classpath the container classpath
  +    * @return the new container
       * @exception Exception is an error occurs
       */
       public Container addContainer( String name, ClasspathDescriptor classpath ) 
  @@ -1036,13 +1063,16 @@
       * Utility to create a subsidiary container from a configuration.
       *
       * @param config the subsidiary container configuration
  +    * @return the new container
       * @exception Exception is an error occurs
       */
       public Container addContainer( Configuration config ) throws Exception
       {
           if( !(( m_state == INITIALIZED ) || ( m_state == SUSPENDED )) )
  +        {
               throw new IllegalStateException( 
                 "Container not in initialized or suspended state." );
  +        }
   
           ContainerService service = m_factory.build( config );
           Resource resource = service.getResource( this );
  @@ -1053,6 +1083,7 @@
       * Internal utility to create a subsidiary container.
       *
       * @param config the subsidiary container configuration
  +    * @return the new container
       * @exception Exception is an error occurs
       */
       private Container addContainer( 
  @@ -1061,8 +1092,10 @@
         throws Exception
       {
           if( !(( m_state == INITIALIZED ) || ( m_state == SUSPENDED )) )
  +        {
               throw new IllegalStateException( 
                 "Container not in initialized or suspended state." );
  +        }
   
           ContainerService service = m_factory.build( descriptor, classpath );
           Resource resource = service.getResource( this );
  @@ -1098,7 +1131,9 @@
               {
                   Container container = (Container)iterator.next();
                   if( container.getState() < state )
  -                  return false;
  +                {
  +                    return false;
  +                }
               }
               return true;
           }
  
  
  
  1.4       +3 -0      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/StateEvent.java
  
  Index: StateEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/StateEvent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StateEvent.java	8 Aug 2002 21:30:17 -0000	1.3
  +++ StateEvent.java	22 Aug 2002 13:43:01 -0000	1.4
  @@ -13,6 +13,8 @@
   /**
    * The <code>StateEvent</code> is an event raised by a component
    * signally a change in state.
  + * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
  + * @version $Revision$ $Date$
    */
   public class StateEvent extends EventObject
   {
  @@ -78,6 +80,7 @@
      /**
       * Returns the state that the component has raised inidicating
       * that the component has completed transitioning to that state.
  +    * @return the state
       */
       public int getState()
       {
  
  
  
  1.2       +3 -0      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/StateListener.java
  
  Index: StateListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/StateListener.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StateListener.java	4 Aug 2002 06:43:20 -0000	1.1
  +++ StateListener.java	22 Aug 2002 13:43:01 -0000	1.2
  @@ -10,6 +10,8 @@
   
   /**
    * A <code>StateListener</code> listens to <code>StateEvent</code> events.
  + * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
  + * @version $Revision$ $Date$
    */
   
   public interface StateListener
  @@ -17,6 +19,7 @@
   
      /**
       * Method invoked when a container state changes.
  +    * @param event the state event
       */
       public void stateChanged( StateEvent event );
   
  
  
  
  1.5       +3 -1      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/StructuralExtension.java
  
  Index: StructuralExtension.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/StructuralExtension.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StructuralExtension.java	14 Aug 2002 10:46:29 -0000	1.4
  +++ StructuralExtension.java	22 Aug 2002 13:43:01 -0000	1.5
  @@ -28,7 +28,9 @@
           throws Exception
        {
           if( !( object instanceof Structural ) )
  -          return;
  +        {
  +            return;
  +        }
   
           ((Structural)object).assemble( );
       }
  
  
  
  1.43      +82 -76    jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultKernel.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- DefaultKernel.java	20 Aug 2002 23:23:08 -0000	1.42
  +++ DefaultKernel.java	22 Aug 2002 13:43:02 -0000	1.43
  @@ -8,89 +8,43 @@
   
   package org.apache.excalibur.merlin.kernel;
   
  -import java.io.InputStream;
   import java.io.File;
  -import java.io.IOException;
  -import java.net.URL;
  -import java.net.JarURLConnection;
  -import java.net.URLClassLoader;
   import java.util.ArrayList;
  -import java.util.List;
  -import java.util.LinkedList;
  -import java.util.Hashtable;
  -import java.util.Properties;
  -import java.util.Vector;
  -import java.util.Iterator;
  -import java.util.jar.Attributes;
  -import java.util.jar.Manifest;
  -import java.security.Policy;
  -import java.io.FileInputStream;
  -
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.excalibur.configuration.ConfigurationUtil;
  -import org.apache.avalon.framework.CascadingRuntimeException;
  +
   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.logger.AvalonFormatter;
  -import org.apache.avalon.framework.logger.LogKitLogger;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.activity.Executable;
   import org.apache.avalon.framework.activity.Startable;
  -import org.apache.avalon.framework.CascadingRuntimeException;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.DefaultConfiguration;
  -import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.service.Serviceable;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.avalon.framework.service.DefaultServiceManager;
  -import org.apache.avalon.framework.service.ServiceException;
  -import org.apache.avalon.framework.Version;
  -import org.apache.excalibur.configuration.ConfigurationUtil;
  -import org.apache.excalibur.meta.info.Type;
  -import org.apache.excalibur.meta.info.ServiceDescriptor;
  -import org.apache.excalibur.meta.info.DependencyDescriptor;
  -import org.apache.excalibur.meta.info.ReferenceDescriptor;
  -import org.apache.excalibur.meta.info.EntryDescriptor;
  +import org.apache.excalibur.event.command.TPCThreadManager;
  +import org.apache.excalibur.event.command.CommandManager;
   import org.apache.excalibur.meta.verifier.VerifyException;
   import org.apache.excalibur.merlin.model.verifier.AssemblyVerifier;
   import org.apache.excalibur.merlin.model.verifier.MetaDataVerifier;
  -import org.apache.excalibur.merlin.model.builder.XMLContainerUtil;
  -import org.apache.excalibur.merlin.model.LibraryDescriptor;
  +import org.apache.excalibur.merlin.model.builder.XMLContainerCreator;
  +import org.apache.excalibur.merlin.model.CategoriesDescriptor;
   import org.apache.excalibur.merlin.model.ClasspathDescriptor;
  +import org.apache.excalibur.merlin.model.LibraryDescriptor;
  +import org.apache.excalibur.merlin.model.LoggingDescriptor;
   import org.apache.excalibur.merlin.model.Profile;
  -import org.apache.excalibur.merlin.model.CategoriesDescriptor;
  -import org.apache.excalibur.merlin.model.ContainerDescriptor;
  -import org.apache.excalibur.merlin.model.ContextDirective;
   import org.apache.excalibur.merlin.model.Resource;
  -import org.apache.excalibur.merlin.model.builder.XMLContainerUtil;
  -import org.apache.excalibur.merlin.model.LoggingDescriptor;
  -import org.apache.excalibur.merlin.assembly.TypeManager;
  -import org.apache.excalibur.merlin.assembly.TypeException;
   import org.apache.excalibur.merlin.assembly.ContainerManager;
   import org.apache.excalibur.merlin.assembly.KernelManager;
   import org.apache.excalibur.merlin.assembly.DefaultLoggerManager;
   import org.apache.excalibur.merlin.container.Container;
  -import org.apache.excalibur.merlin.container.DefaultContainer;
   import org.apache.excalibur.merlin.container.ContainerService;
  -import org.apache.excalibur.merlin.container.StateListener;
  -import org.apache.excalibur.merlin.container.StateEvent;
   import org.apache.excalibur.merlin.container.ContainerFactory;
   import org.apache.excalibur.merlin.resource.LifestyleManager;
   import org.apache.excalibur.merlin.resource.DefaultLifestyleManager;
  -import org.apache.excalibur.event.command.TPCThreadManager;
  -import org.apache.excalibur.event.command.CommandManager;
  -import org.apache.excalibur.mpool.PoolManager;
   import org.apache.excalibur.mpool.DefaultPoolManager;
  +import org.apache.excalibur.mpool.PoolManager;
   
   /**
    * Default kernel implementation.
  @@ -148,14 +102,21 @@
    * @version $Revision$ $Date$
    */
   public class DefaultKernel
  -  implements Kernel, Contextualizable, Configurable, Initializable, Startable, Disposable
  +  implements Kernel, Contextualizable, Configurable, Initializable, Startable, 
  +  Disposable
   {
       //=======================================================================
       // static
       //=======================================================================
   
  +   /**
  +    * The context key for the working directory.
  +    */
       public static final String DIR_KEY = "avalon:home";
   
  +   /**
  +    * The context key for the path to the configuration.
  +    */
       public static final String PATH_KEY = "path";
   
       //=======================================================================
  @@ -182,7 +143,7 @@
   
       private Context m_context;
   
  -    private XMLContainerUtil m_creator = new XMLContainerUtil();
  +    private XMLContainerCreator m_creator = new XMLContainerCreator();
   
       private TPCThreadManager m_threadManager;
       private CommandManager m_commandManager;
  @@ -224,7 +185,7 @@
       * The logging manager that we use to construct logging catagories
       * and logging channels.
       */
  -    private static DefaultLoggerManager m_logging;
  +    private static DefaultLoggerManager c_logging;
   
      /**
       * The kernel manager's base path.
  @@ -279,6 +240,10 @@
       // Configurable
       //=======================================================================
   
  +   /**
  +    * Configuration of the kernel.
  +    * @param config the configuration
  +    */
       public void configure( Configuration config )
       {
           m_config = config;
  @@ -288,6 +253,10 @@
       // Initializable
       //=======================================================================
   
  +   /**
  +    * Initialization of the kernel.
  +    * @exception Exception if an initalization phase error occurs
  +    */
       public void initialize() throws Exception
       {
           ClassLoader classloader = Thread.currentThread().getContextClassLoader();
  @@ -328,7 +297,7 @@
           {
               LoggingDescriptor logging =
                 m_creator.createLoggingDescriptor( m_config.getChild("logging"), name );
  -            m_logging = new DefaultLoggerManager( logging );
  +            c_logging = new DefaultLoggerManager( logging );
               m_base = name;
   
               //
  @@ -397,7 +366,7 @@
               m_manager = new KernelManager( m_base );
               m_manager.enableLogging( m_logger );
               DefaultContext ctx = new DefaultContext( m_context );
  -            ctx.put( KernelManager.LOGGING_KEY, m_logging );
  +            ctx.put( KernelManager.LOGGING_KEY, c_logging );
               ctx.put( ContainerManager.EXTENSIONS_DESCRIPTOR_KEY, extensions );
               ctx.put( ContainerManager.CLASSPATH_DESCRIPTOR_KEY, classpath );
               ctx.put( ContainerManager.LIFESTYLES_KEY, dlm );
  @@ -422,12 +391,18 @@
                       Class clazz = m_manager.loadClass( lifestyleClassname );
                       lifestyles = (LifestyleManager) clazz.newInstance();
                       if( lifestyles instanceof LogEnabled )
  -                      ((LogEnabled)lifestyles).enableLogging(
  -                        getLogger().getChildLogger("lifestyles") );
  +                    {
  +                        ((LogEnabled)lifestyles).enableLogging(
  +                          getLogger().getChildLogger("lifestyles") );
  +                    }
                       if( lifestyles instanceof Configurable )
  -                      ((Configurable)lifestyles).configure( lifestyleConfig );
  +                    {
  +                        ((Configurable)lifestyles).configure( lifestyleConfig );
  +                    }
                       if( lifestyles instanceof Initializable )
  -                      ((Initializable)lifestyles).initialize();
  +                    {
  +                        ((Initializable)lifestyles).initialize();
  +                    }
                   }
                   catch( Throwable e )
                   {
  @@ -464,9 +439,9 @@
       */
       protected DefaultLoggerManager getLoggingManager()
       {
  -        if( m_logging != null )
  +        if( c_logging != null )
           {
  -            return m_logging;
  +            return c_logging;
           }
           else
           {
  @@ -490,18 +465,27 @@
      /**
       * Invoked by a contrainer to requested disposal of the kernel and all
       * consumed resources.
  +    * @exception Exception is a startup error occurs
       */
       public void start() throws Exception
       {
           if( !m_initialized )
  -          throw new IllegalStateException("not initialized");
  +        {
  +            throw new IllegalStateException("not initialized");
  +        }
           if( m_stopped )
  -          throw new IllegalStateException("already stopped");
  +        {
  +            throw new IllegalStateException("already stopped");
  +        }
           if( m_started )
  -          throw new IllegalStateException("already started");
  +        {
  +            throw new IllegalStateException("already started");
  +        }
   
           if( getLogger().isInfoEnabled() )
  -          getLogger().info("startup");
  +        {
  +            getLogger().info("startup");
  +        }
   
           if( m_container instanceof Startable )
           {
  @@ -519,17 +503,29 @@
           }
   
           if( getLogger().isInfoEnabled() )
  -          getLogger().info("started");
  +        {
  +            getLogger().info("started");
  +        }
       }
   
  +   /**
  +    * Stop the kernel.
  +    * @exception Exception if a shutdown error occurs.
  +    */
       public void stop() throws Exception
       {
           if( !m_initialized )
  -          throw new IllegalStateException("not initialized");
  +        {
  +            throw new IllegalStateException("not initialized");
  +        }
           if( m_stopped )
  -          throw new IllegalStateException("already stopped");
  +        {
  +            throw new IllegalStateException("already stopped");
  +        }
           if( !m_started )
  -          throw new IllegalStateException("not started");
  +        {
  +            throw new IllegalStateException("not started");
  +        }
   
           if( m_container instanceof Startable )
           {
  @@ -569,11 +565,19 @@
       // Kernel
       //=======================================================================
   
  +   /**
  +    * Returns the root container.
  +    * @return the root container
  +    */
       public Container getRootContainer()
       {
           return m_container;
       }
   
  +   /**
  +    * Returns the set of resoruces established within the container hierachy
  +    * @return the resource collection
  +    */
       public Resource[] getResources()
       {
           synchronized( m_container )
  @@ -585,12 +589,14 @@
      /**
       * Internal verification of the container.
       *
  -    * @exception ValidationException if a validation failure occurs
  +    * @exception VerifyException if a validation failure occurs
       */
       public void verify() throws VerifyException
       {
           if( !m_initialized )
  -          throw new IllegalStateException("not initialized");
  +        {
  +            throw new IllegalStateException("not initialized");
  +        }
   
           getLogger().debug("verify");
   
  
  
  
  1.13      +2 -5      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/Kernel.java
  
  Index: Kernel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/Kernel.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Kernel.java	8 Aug 2002 21:30:17 -0000	1.12
  +++ Kernel.java	22 Aug 2002 13:43:02 -0000	1.13
  @@ -8,10 +8,7 @@
   
   package org.apache.excalibur.merlin.kernel;
   
  -import org.apache.excalibur.merlin.Controller;
   import org.apache.excalibur.merlin.model.Resource;
  -import org.apache.excalibur.meta.info.ServiceDescriptor;
  -import org.apache.excalibur.meta.info.EntryDescriptor;
   import org.apache.excalibur.meta.verifier.VerifyException;
   
   /**
  @@ -28,7 +25,7 @@
      /**
       * Method invoked to request type level validation of the application.
       *
  -    * @exception ValidationException if a validation failure occurs
  +    * @exception VerifyException if a validation failure occurs
       */
       void verify() throws VerifyException;
   
  
  
  
  1.5       +1 -6      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ContainerBuilder.java
  
  Index: ContainerBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ContainerBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ContainerBuilder.java	12 Aug 2002 02:00:10 -0000	1.4
  +++ ContainerBuilder.java	22 Aug 2002 13:43:02 -0000	1.5
  @@ -10,11 +10,6 @@
   import java.io.InputStream;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.configuration.DefaultConfiguration;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
   import org.apache.excalibur.meta.info.Type;
   import org.apache.excalibur.merlin.model.ContainerDescriptor;
   
  
  
  
  1.6       +13 -9     jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ContainerCreator.java
  
  Index: ContainerCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ContainerCreator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ContainerCreator.java	8 Aug 2002 10:00:50 -0000	1.5
  +++ ContainerCreator.java	22 Aug 2002 13:43:02 -0000	1.6
  @@ -22,25 +22,29 @@
   public interface ContainerCreator
   {
       /**
  -     * Create a set of packaged {@link ContainerDescriptor} instances from stream
  +     * Create a set of packaged {@link ContainerDescriptor} 
  +     * instances from stream
        *
        * @param loader the classloader
        * @param type the base type
        * @param inputStream the stream that the resource is loaded from
        * @return the newly created {@link ContainerDescriptor} array
  -     * @throws Exception
  +     * @throws Exception if an error occurs while creating the descriptor
        */
  -    ContainerDescriptor[] createPackagedContainerDescriptors( ClassLoader loader, Type type, InputStream inputStream )
  -        throws Exception;
  +    ContainerDescriptor[] createPackagedContainerDescriptors( 
  +      ClassLoader loader, Type type, InputStream inputStream )
  +      throws Exception;
   
       /**
  -     * Create an explicit {@link ContainerDescriptor} instances from a configuration.
  +     * Create an explicit {@link ContainerDescriptor} instances from 
  +     *   a configuration.
        * @param type the component type
        * @param config the profile description
        * @return the profile
  -     * @exception Exception if an error occurs during profile creation
  +     * @exception Exception if an error occurs during descriptor creation
        */
  -    ContainerDescriptor createContainerDescriptor( Type type, Configuration config )
  -        throws Exception;
  +    ContainerDescriptor createContainerDescriptor( 
  +      Type type, Configuration config )
  +      throws Exception;
   
   }
  
  
  
  1.6       +1 -6      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ProfileBuilder.java
  
  Index: ProfileBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ProfileBuilder.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProfileBuilder.java	4 Aug 2002 11:49:36 -0000	1.5
  +++ ProfileBuilder.java	22 Aug 2002 13:43:02 -0000	1.6
  @@ -10,11 +10,6 @@
   import java.io.InputStream;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.configuration.DefaultConfiguration;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
   import org.apache.excalibur.meta.info.Type;
   import org.apache.excalibur.meta.info.builder.TypeBuilder;
   import org.apache.excalibur.merlin.model.Profile;
  
  
  
  1.8       +6 -3      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ProfileCreator.java
  
  Index: ProfileCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ProfileCreator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProfileCreator.java	4 Aug 2002 12:04:00 -0000	1.7
  +++ ProfileCreator.java	22 Aug 2002 13:43:02 -0000	1.8
  @@ -28,9 +28,12 @@
        * @param type the base type
        * @param inputStream the stream that the resource is loaded from
        * @return the newly created {@link Profile} array
  -     * @throws Exception
  +     * @exception Exception if a error occurs during profile creation
        */
  -    Profile[] createPackagedProfiles( ClassLoader loader, Type type, InputStream inputStream )
  +    Profile[] createPackagedProfiles( 
  +                         ClassLoader loader, 
  +                         Type type, 
  +                         InputStream inputStream )
           throws Exception;
   
       /**
  
  
  
  1.12      +124 -36   jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerCreator.java
  
  Index: XMLContainerCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerCreator.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XMLContainerCreator.java	19 Aug 2002 23:05:06 -0000	1.11
  +++ XMLContainerCreator.java	22 Aug 2002 13:43:02 -0000	1.12
  @@ -27,12 +27,9 @@
   import org.apache.excalibur.merlin.model.TargetProvider;
   import org.apache.excalibur.merlin.model.FileTargetProvider;
   import org.apache.excalibur.merlin.model.LibraryDescriptor;
  -import org.apache.excalibur.merlin.model.ModelException;
  -import org.apache.excalibur.merlin.model.builder.XMLProfileCreator;
   import org.apache.excalibur.merlin.model.ContextDirective;
   import org.apache.excalibur.merlin.model.Import;
   import org.apache.excalibur.merlin.model.Entry;
  -import org.apache.excalibur.merlin.model.Parameter;
   import org.apache.excalibur.meta.info.Type;
   import org.apache.excalibur.meta.ConfigurationBuilder;
   import org.xml.sax.InputSource;
  @@ -56,6 +53,7 @@
        * container type, loaded from specified {@link InputStream}.  If the 
        * input stream is null, an implicit profile will be created.
        *
  +     * @param loader the classloader to use
        * @param type the base type
        * @param inputStream the InputStream to load Type from
        * @return the created set of container profiles
  @@ -68,32 +66,37 @@
           if( inputStream != null )
           {
               final InputSource input = new InputSource( inputStream );
  -            final Configuration configuration = ConfigurationBuilder.build( input );
  -            return createPackagedContainerDescriptors( loader, type, configuration );
  +            final Configuration configuration = 
  +              ConfigurationBuilder.build( input );
  +            return createPackagedContainerDescriptors( 
  +              loader, type, configuration );
           }
           else
           {
  -            ContainerDescriptor profile = createImplicitContainerDescriptor( type );
  +            ContainerDescriptor profile = 
  +              createImplicitContainerDescriptor( type );
               return new ContainerDescriptor[]{ profile };
           }
       }
   
       /**
  -     * Create an explicit {@link ContainerDescriptor} instance from a configuration.
  +     * Create an explicit {@link ContainerDescriptor} instance from a 
  +     *   configuration.
        * @param type the component type
        * @param config the profile description
        * @return the profile
        * @exception Exception if an error occurs during profile creation
        */
  -    public ContainerDescriptor createContainerDescriptor( Type type, Configuration config )
  +    public ContainerDescriptor createContainerDescriptor( 
  +                        Type type, Configuration config )
         throws Exception
       {
           return buildContainerDescriptor( type, config, Profile.EXPLICIT );
       }
   
       /**
  -     * Create an array of {@link ContainerDescriptor} object for specified type from
  -     * specified configuration data associated with a single type.
  +     * Create an array of {@link ContainerDescriptor} object for specified 
  +     * type from configuration data associated with a single type.
        *
        * @param loader the classloader to use
        * @param type the base component type
  @@ -109,23 +112,32 @@
           Configuration[] profiles = info.getChildren("component");
           if( profiles.length == 0 )
           {
  -            ContainerDescriptor profile = createImplicitContainerDescriptor( type );
  +            ContainerDescriptor profile = 
  +              createImplicitContainerDescriptor( type );
               return new ContainerDescriptor[]{ profile };
           }
           for( int i=0; i<profiles.length; i++ )
           {
  -           vector.add( buildContainerDescriptor( type, profiles[i], Profile.PACKAGED ) );
  +           vector.add( 
  +             buildContainerDescriptor( 
  +               type, profiles[i], Profile.PACKAGED ) );
           }
  -        return (ContainerDescriptor[]) vector.toArray( new ContainerDescriptor[0] );
  +        return (ContainerDescriptor[]) vector.toArray( 
  +           new ContainerDescriptor[0] );
       }
   
  -    private ContainerDescriptor createImplicitContainerDescriptor( Type type ) throws Exception
  +    private ContainerDescriptor createImplicitContainerDescriptor( Type type ) 
  +      throws Exception
       {
           ContextDirective context = new ContextDirective( 
  -          ContextDirective.DEFAULT_CONTEXT_CLASS, new Import[0], new Entry[0] );
  -        final Configuration defaults = new DefaultConfiguration("default",null);
  -        final CategoriesDescriptor categories = createDefaultCategoriesDescriptor( type );
  -        final ClasspathDescriptor classpath = new ClasspathDescriptor();
  +          ContextDirective.DEFAULT_CONTEXT_CLASS, 
  +          new Import[0], new Entry[0] );
  +        final Configuration defaults = 
  +          new DefaultConfiguration("default",null);
  +        final CategoriesDescriptor categories = 
  +          createDefaultCategoriesDescriptor( type );
  +        final ClasspathDescriptor classpath = 
  +          new ClasspathDescriptor();
   
           return new ContainerDescriptor( 
             null, null, defaults, context, categories, type, true, false,
  @@ -133,8 +145,8 @@
           );
       }
   
  -
  -    private ContainerDescriptor buildContainerDescriptor( Type type, Configuration profile, int mode ) 
  +    private ContainerDescriptor buildContainerDescriptor( 
  +      Type type, Configuration profile, int mode ) 
         throws Exception
       {
   
  @@ -145,20 +157,34 @@
           final String name = profile.getAttribute("name");
           CategoriesDescriptor categories = 
             createCategoriesDescriptor( name, profile.getChild("categories") );
  -        final boolean enabled = profile.getAttributeAsBoolean( "enabled", true );
  -        final boolean activation = profile.getAttributeAsBoolean( "activation", false );
  -        final Parameters params = Parameters.fromConfiguration( profile.getChild("parameters") );
  -        final ContextDirective context = createContextDirective( profile.getChild("context") );
  -        final Configuration config = profile.getChild("configuration");
  +        final boolean enabled = 
  +          profile.getAttributeAsBoolean( "enabled", true );
  +        final boolean activation = 
  +          profile.getAttributeAsBoolean( "activation", false );
  +        final Parameters params = 
  +          Parameters.fromConfiguration( profile.getChild("parameters") );
  +        final ContextDirective context = 
  +          createContextDirective( profile.getChild("context") );
  +        final Configuration config = 
  +          profile.getChild("configuration");
   
           //
           // create the profile instance
           //
   
           return new ContainerDescriptor( 
  -          name, params, config, context, categories, type, enabled, activation, mode  );
  +          name, params, config, context, categories, type, 
  +          enabled, activation, mode  );
       }
   
  +   /**
  +    * Utility method to create a new classpath descriptor from a 
  +    * configuration instance.
  +    * @param config a configuration defining the classpath
  +    * @return the classpath descriptor
  +    * @exception ConfigurationException if the configuration is 
  +    *   incomplete
  +    */
       public ClasspathDescriptor createClasspathDescriptor( Configuration config )
         throws ConfigurationException
       {
  @@ -169,10 +195,19 @@
               Configuration c = configs[i];
               list.add( createFilesetDescriptor( c ) );
           }
  -        FilesetDescriptor[] filesets = (FilesetDescriptor[]) list.toArray( new FilesetDescriptor[0] );
  +        FilesetDescriptor[] filesets = 
  +         (FilesetDescriptor[]) list.toArray( new FilesetDescriptor[0] );
           return new ClasspathDescriptor( filesets );
       }
   
  +   /**
  +    * Utility method to create a new fileset descriptor from a 
  +    * configuration instance.
  +    * @param config a configuration defining the fileset
  +    * @return the fileset descriptor
  +    * @exception ConfigurationException if the configuration is 
  +    *   incomplete
  +    */
       public FilesetDescriptor createFilesetDescriptor( Configuration config ) 
         throws ConfigurationException
       {
  @@ -184,10 +219,19 @@
               Configuration includeConfig = includeConfigs[i];
               list.add( createIncludeDescriptor( includeConfig ) );
           }
  -        IncludeDescriptor[] includes = (IncludeDescriptor[]) list.toArray( new IncludeDescriptor[0] );
  +        IncludeDescriptor[] includes = 
  +          (IncludeDescriptor[]) list.toArray( new IncludeDescriptor[0] );
           return new FilesetDescriptor( base, includes );
       }
   
  +   /**
  +    * Utility method to create a new include descriptor from a 
  +    * configuration instance.
  +    * @param config a configuration defining the include descriptor
  +    * @return the include descriptor
  +    * @exception ConfigurationException if the configuration is 
  +    *   incomplete
  +    */
       public IncludeDescriptor createIncludeDescriptor( Configuration config ) 
         throws ConfigurationException
       {
  @@ -195,7 +239,17 @@
           return new IncludeDescriptor( filename );
       }
   
  -    public LoggingDescriptor createLoggingDescriptor( Configuration config, String name )
  +   /**
  +    * Utility method to create a new logging descriptor from a 
  +    * configuration instance.
  +    * @param config a configuration defining the logging descriptor
  +    * @param name a default name value
  +    * @return the logging descriptor
  +    * @exception ConfigurationException if the configuration is 
  +    *   incomplete
  +    */
  +    public LoggingDescriptor createLoggingDescriptor( 
  +            Configuration config, String name )
         throws ConfigurationException
       {
           final String target = config.getAttribute( 
  @@ -210,17 +264,32 @@
               Configuration c = configs[i];
               list.add( createTargetDescriptor( c ) );
           }
  -        TargetDescriptor[] targets = (TargetDescriptor[]) list.toArray( new TargetDescriptor[0] );
  -        return new LoggingDescriptor( name, priority, target, targets, category );
  +        TargetDescriptor[] targets = 
  +          (TargetDescriptor[]) list.toArray( 
  +             new TargetDescriptor[0] );
  +        return new LoggingDescriptor( 
  +          name, priority, target, targets, category );
       }
   
  +   /**
  +    * Utility method to create a new target descriptor from a 
  +    * configuration instance.
  +    * @param config a configuration defining the target descriptor
  +    * @return the logging target descriptor
  +    * @exception ConfigurationException if the configuration is 
  +    *   incomplete
  +    */
       public TargetDescriptor createTargetDescriptor( Configuration config )
         throws ConfigurationException
       {
           final String name = config.getAttribute("name");
           if( config.getChildren().length == 0 )
  -          throw new ConfigurationException(
  -            "missing target provider elememt in '" + config.getName() + "'.");
  +        {
  +            throw new ConfigurationException(
  +              "missing target provider elememt in '" 
  +              + config.getName() + "'.");
  +        }
  +
           final Configuration c = config.getChildren()[0];
           TargetProvider provider = null;
           if( c.getName().equals("file") )
  @@ -235,6 +304,14 @@
           return new TargetDescriptor( name, provider );
       }
   
  +   /**
  +    * Utility method to create a new file target descriptor from a 
  +    * configuration instance.
  +    * @param config a configuration defining the file target descriptor
  +    * @return the file target descriptor
  +    * @exception ConfigurationException if the configuration is 
  +    *   incomplete
  +    */
       public FileTargetProvider createFileTargetProvider( Configuration config )
         throws ConfigurationException
       {
  @@ -242,12 +319,22 @@
           return new FileTargetProvider( file );
       }
   
  +   /**
  +    * Utility method to create a new jar file extension library 
  +    * descriptor from a configuration instance.
  +    * @param config a configuration defining the library descriptor
  +    * @return the library descriptor
  +    * @exception ConfigurationException if the configuration is 
  +    *   incomplete
  +    */
       public LibraryDescriptor createLibraryDescriptor( Configuration config )
         throws ConfigurationException
       {
   
           if( config == null ) 
  -          return new LibraryDescriptor();
  +        {
  +            return new LibraryDescriptor();
  +        }
   
           String base = config.getAttribute("dir");
   
  @@ -258,7 +345,8 @@
               Configuration c = configs[i];
               list.add( createIncludeDescriptor( c ) );
           }
  -        IncludeDescriptor[] dirs = (IncludeDescriptor[]) list.toArray( new IncludeDescriptor[0] );
  +        IncludeDescriptor[] dirs = 
  +          (IncludeDescriptor[]) list.toArray( new IncludeDescriptor[0] );
           return new LibraryDescriptor( base, dirs );
       }
   
  
  
  
  1.17      +132 -34   jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLProfileCreator.java
  
  Index: XMLProfileCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLProfileCreator.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- XMLProfileCreator.java	12 Aug 2002 02:00:11 -0000	1.16
  +++ XMLProfileCreator.java	22 Aug 2002 13:43:02 -0000	1.17
  @@ -9,18 +9,13 @@
   
   import java.io.InputStream;
   import java.util.ArrayList;
  -import java.util.Properties;
   import java.util.Vector;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.Version;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.configuration.DefaultConfiguration;
   import org.apache.avalon.framework.parameters.Parameters;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
   import org.apache.excalibur.meta.info.Type;
   import org.apache.excalibur.meta.info.builder.XMLTypeCreator;
   import org.apache.excalibur.meta.ConfigurationBuilder;
  @@ -31,8 +26,6 @@
   import org.apache.excalibur.merlin.model.Import;
   import org.apache.excalibur.merlin.model.Entry;
   import org.apache.excalibur.merlin.model.Parameter;
  -import org.apache.excalibur.configuration.ContextFactory;
  -import org.apache.excalibur.configuration.CascadingConfiguration;
   import org.xml.sax.InputSource;
   
   /**
  @@ -54,6 +47,7 @@
        * type, loaded from specified {@link InputStream}.  If the 
        * input stream is null, an implicit profile will be created.
        *
  +     * @param loader the classloader
        * @param type the base type
        * @param inputStream the InputStream to load Type from
        * @return the created set of profiles
  @@ -66,7 +60,8 @@
           if( inputStream != null )
           {
               final InputSource input = new InputSource( inputStream );
  -            final Configuration configuration = ConfigurationBuilder.build( input );
  +            final Configuration configuration = 
  +              ConfigurationBuilder.build( input );
               return createPackagedProfiles( loader, type, configuration );
           }
           else
  @@ -97,7 +92,7 @@
        * @param type the base component type
        * @param info the configuration
        * @return the created set of profiles
  -     * @throws ConfigurationException if an error occurs
  +     * @throws Exception if an error occurs
        */
       private Profile[] createPackagedProfiles( 
         ClassLoader loader, Type type, final Configuration info )
  @@ -112,12 +107,14 @@
           }
           for( int i=0; i<profiles.length; i++ )
           {
  -           vector.add( buildProfile( type, profiles[i], Profile.PACKAGED ) );
  +           vector.add( buildProfile( 
  +             type, profiles[i], Profile.PACKAGED ) );
           }
           return (Profile[]) vector.toArray( new Profile[0] );
       }
   
  -    private Profile buildProfile( Type type, Configuration profile, int mode ) 
  +    private Profile buildProfile( 
  +              Type type, Configuration profile, int mode ) 
         throws Exception
       {
   
  @@ -128,34 +125,59 @@
           final String name = profile.getAttribute("name");
   
           CategoriesDescriptor categories = 
  -          createCategoriesDescriptor( name, profile.getChild("categories") );
  +          createCategoriesDescriptor( 
  +            name, profile.getChild("categories") );
   
           //
           // build the profile directives
           //
   
  -        final boolean enabled = profile.getAttributeAsBoolean( "enabled", true );
  -        final boolean activation = profile.getAttributeAsBoolean( "activation", false );
  -        final Parameters params = Parameters.fromConfiguration( profile.getChild("parameters") );
  -        final ContextDirective context = createContextDirective( profile.getChild("context") );
  -        final Configuration config = profile.getChild("configuration");
  +        final boolean enabled = 
  +          profile.getAttributeAsBoolean( "enabled", true );
  +        final boolean activation = 
  +          profile.getAttributeAsBoolean( "activation", false );
  +        final Parameters params = 
  +          Parameters.fromConfiguration( profile.getChild("parameters") );
  +        final ContextDirective context = 
  +          createContextDirective( profile.getChild("context") );
  +        final Configuration config = 
  +          profile.getChild("configuration");
   
           //
           // create the profile instance
           //
   
  -        return new Profile( name, params, config, context, categories, type, enabled, activation, mode  );
  +        return new Profile( 
  +          name, params, config, context, categories, type, enabled, 
  +          activation, mode  );
       }
   
  -    public ContextDirective createContextDirective( Configuration config ) throws ConfigurationException
  +    /**
  +     * Utility method to create a new context directive.
  +     *
  +     * @param config the context directive configuration
  +     * @return the context directive
  +     * @throws ConfigurationException if an error occurs
  +     */
  +    public ContextDirective createContextDirective( Configuration config ) 
  +      throws ConfigurationException
       {
  -        String classname = config.getAttribute( "class", ContextDirective.DEFAULT_CONTEXT_CLASS );
  +        String classname = config.getAttribute( 
  +          "class", ContextDirective.DEFAULT_CONTEXT_CLASS );
           Import[] imports = createImports( config.getChildren("import") );
           Entry[] entries = createEntries( config.getChildren("entry") );
           return new ContextDirective( classname, imports, entries );
       }
   
  -    public Import[] createImports( Configuration[] configs ) throws ConfigurationException
  +    /**
  +     * Utility method to create a set of import directive.
  +     *
  +     * @param configs the import directive configurations
  +     * @return the import directives
  +     * @throws ConfigurationException if an error occurs
  +     */
  +    public Import[] createImports( Configuration[] configs ) 
  +      throws ConfigurationException
       {
           ArrayList list = new ArrayList();
           for( int i=0; i<configs.length; i++ )
  @@ -165,14 +187,30 @@
           return (Import[]) list.toArray( new Import[0] );
       }
   
  -    public Import createImport( Configuration config ) throws ConfigurationException
  +    /**
  +     * Utility method to create a new import directive.
  +     *
  +     * @param config the import directive configuration
  +     * @return the import directive
  +     * @throws ConfigurationException if an error occurs
  +     */
  +    public Import createImport( Configuration config ) 
  +      throws ConfigurationException
       {
           final String key = config.getAttribute( "key" );
           final String path = config.getAttribute( "name", null );
           return new Import( key, path );
       }
   
  -    public Entry[] createEntries( Configuration[] configs ) throws ConfigurationException
  +    /**
  +     * Utility method to create a set of entry directives.
  +     *
  +     * @param configs the entry directive configurations
  +     * @return the entry directives
  +     * @throws ConfigurationException if an error occurs
  +     */
  +    public Entry[] createEntries( Configuration[] configs ) 
  +      throws ConfigurationException
       {
           ArrayList list = new ArrayList();
           for( int i=0; i<configs.length; i++ )
  @@ -183,7 +221,15 @@
           return (Entry[]) list.toArray( new Entry[0] );
       }
   
  -    public Entry createEntry( Configuration config ) throws ConfigurationException
  +    /**
  +     * Utility method to create a new entry directive.
  +     *
  +     * @param config the entry directive configuration
  +     * @return the entry directive
  +     * @throws ConfigurationException if an error occurs
  +     */
  +    public Entry createEntry( Configuration config ) 
  +      throws ConfigurationException
       {
           String key = config.getAttribute( "key" );
           String classname = config.getAttribute( "class", "java.lang.String" );
  @@ -200,7 +246,15 @@
           }
       }
   
  -    public Parameter[] createParameters( Configuration[] configs ) throws ConfigurationException
  +    /**
  +     * Utility method to create a set of parameter directive.
  +     *
  +     * @param configs the parameter directive configurations
  +     * @return the parameter directives
  +     * @throws ConfigurationException if an error occurs
  +     */
  +    public Parameter[] createParameters( Configuration[] configs ) 
  +      throws ConfigurationException
       {
           ArrayList list = new ArrayList();
           for( int i=0; i<configs.length; i++ )
  @@ -211,7 +265,15 @@
           return (Parameter[]) list.toArray( new Parameter[0] );
       }
   
  -    public Parameter createParameter( Configuration config ) throws ConfigurationException
  +    /**
  +     * Utility method to create a new parameter directive.
  +     *
  +     * @param config the parameter directive configuration
  +     * @return the parameter directive
  +     * @throws ConfigurationException if an error occurs
  +     */
  +    public Parameter createParameter( Configuration config ) 
  +      throws ConfigurationException
       {
           String classname = config.getAttribute( "class", "java.lang.String" );
           String value = config.getValue( null );
  @@ -227,7 +289,16 @@
           }
       }
   
  -    public CategoriesDescriptor createCategoriesDescriptor( String name, Configuration config )
  +    /**
  +     * Utility method to create a new categories directive.
  +     *
  +     * @param name the categories base path
  +     * @param config the categories directive configuration
  +     * @return the categories directive
  +     * @throws Exception if an error occurs
  +     */
  +    public CategoriesDescriptor createCategoriesDescriptor( 
  +         String name, Configuration config )
       throws Exception
       {
           final String priority = config.getAttribute( "priority", null );
  @@ -239,10 +310,19 @@
               Category category = createCategory( configs[i] );
               list.add( category );
           }
  -        Category[] categories = (Category[]) list.toArray( new Category[0] );
  -        return new CategoriesDescriptor( name, priority, target, categories );
  +        Category[] categories = 
  +          (Category[]) list.toArray( new Category[0] );
  +        return new CategoriesDescriptor( 
  +           name, priority, target, categories );
       }
   
  +    /**
  +     * Utility method to create a new category directive.
  +     *
  +     * @param config the category directive configuration
  +     * @return the category directive
  +     * @throws ConfigurationException if an error occurs
  +     */
       public Category createCategory( Configuration config )
         throws ConfigurationException
       {
  @@ -252,6 +332,14 @@
           return new Category( name, priority, target );
       }
   
  +    /**
  +     * Utility method to create a new category directive.
  +     *
  +     * @param config the category directive configuration
  +     * @param def the default category name
  +     * @return the category directive
  +     * @throws ConfigurationException if an error occurs
  +     */
       public Category createCategory( Configuration config, String def )
         throws ConfigurationException
       {
  @@ -264,10 +352,14 @@
   
       private Profile createImplicitProfile( Type type ) throws Exception
       {
  -        ContextDirective context = new ContextDirective( 
  -          ContextDirective.DEFAULT_CONTEXT_CLASS, new Import[0], new Entry[0] );
  -        final Configuration defaults = new DefaultConfiguration("default",null);
  -        final CategoriesDescriptor categories = createDefaultCategoriesDescriptor( type );
  +        ContextDirective context = 
  +          new ContextDirective( 
  +            ContextDirective.DEFAULT_CONTEXT_CLASS, 
  +            new Import[0], new Entry[0] );
  +        final Configuration defaults = 
  +          new DefaultConfiguration("default",null);
  +        final CategoriesDescriptor categories = 
  +          createDefaultCategoriesDescriptor( type );
   
           return new Profile( 
             null, null, defaults, context, categories, type, true, false,
  @@ -275,6 +367,12 @@
           );
       }
   
  +    /**
  +     * Utility method to create a new categories directive.
  +     *
  +     * @param type the component type
  +     * @return the categories directive
  +     */
       protected CategoriesDescriptor createDefaultCategoriesDescriptor( Type type )
       {
           final String name = type.getInfo().getName();
  
  
  
  1.4       +0 -2      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/BasicComponent.java
  
  Index: BasicComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/BasicComponent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicComponent.java	22 Aug 2002 05:01:57 -0000	1.3
  +++ BasicComponent.java	22 Aug 2002 13:43:02 -0000	1.4
  @@ -7,10 +7,8 @@
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   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.configuration.Configuration;
   import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Startable;
   import org.apache.avalon.framework.activity.Disposable;
  
  
  
  1.4       +0 -5      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/BasicContext.java
  
  Index: BasicContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/BasicContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicContext.java	22 Aug 2002 05:01:57 -0000	1.3
  +++ BasicContext.java	22 Aug 2002 13:43:02 -0000	1.4
  @@ -5,13 +5,8 @@
   import java.util.Map;
   import java.io.File;
   
  -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.Contextualizable;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.activity.Startable;
   
   /**
    * This is example of a custom context class.  It is used in the demonsteation
  
  
  
  1.3       +9 -1      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/DemoManager.java
  
  Index: DemoManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/DemoManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DemoManager.java	22 Aug 2002 05:01:57 -0000	1.2
  +++ DemoManager.java	22 Aug 2002 13:43:02 -0000	1.3
  @@ -46,9 +46,11 @@
       public void create( Object target, Context context ) throws Exception
       {
           if( target instanceof Demonstratable )
  -          ((Demonstratable)target).demo( "create id: " 
  +        {
  +            ((Demonstratable)target).demo( "create id: " 
                + System.identityHashCode( this ) 
                + ", " + Thread.currentThread() );
  +        }
       }
   
      /**
  @@ -60,9 +62,11 @@
       public void destroy( Object target, Context context )
       {
           if( target instanceof Demonstratable )
  +        {
             ((Demonstratable)target).demo( "destroy id: " 
                + System.identityHashCode( this ) 
                + ", " + Thread.currentThread() );
  +        }
       }
   
      /**
  @@ -74,9 +78,11 @@
       public void access( Object target, Context context ) throws Exception
       {
           if( target instanceof Demonstratable )
  +        {
             ((Demonstratable)target).demo( "access id: " 
                + System.identityHashCode( this ) 
                + ", " + Thread.currentThread() );
  +        }
       }
   
      /**
  @@ -88,9 +94,11 @@
       public void release( Object target, Context context )
       {
           if( target instanceof Demonstratable )
  +        {
             ((Demonstratable)target).demo( "release id: " 
                + System.identityHashCode( this ) 
                + ", " + Thread.currentThread() );
  +        }
       }
   
       //=======================================================================
  
  
  
  1.3       +1 -1      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/Demonstratable.java
  
  Index: Demonstratable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/Demonstratable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Demonstratable.java	22 Aug 2002 05:01:57 -0000	1.2
  +++ Demonstratable.java	22 Aug 2002 13:43:02 -0000	1.3
  @@ -10,7 +10,7 @@
   {
      /**
       * Do something or other.
  -    * @param the stage being applied (as a string)
  +    * @param stage the stage being applied (as a string)
       */
       void demo( String stage );
   }
  
  
  
  1.3       +0 -7      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/EmbeddedDemo.java
  
  Index: EmbeddedDemo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/EmbeddedDemo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EmbeddedDemo.java	22 Aug 2002 05:01:57 -0000	1.2
  +++ EmbeddedDemo.java	22 Aug 2002 13:43:02 -0000	1.3
  @@ -11,22 +11,15 @@
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.DefaultConfiguration;
  -import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Startable;
   import org.apache.avalon.framework.activity.Disposable;
   
  -import org.apache.excalibur.merlin.kernel.Kernel;
   import org.apache.excalibur.merlin.kernel.DefaultKernel;
   import org.apache.excalibur.merlin.container.Container;
  -import org.apache.excalibur.merlin.model.ContainerDescriptor;
  -import org.apache.excalibur.merlin.model.ClasspathDescriptor;
   import org.apache.excalibur.merlin.model.Profile;
   import org.apache.excalibur.merlin.assembly.ContainerManager;
   import org.apache.excalibur.merlin.container.ContainerFactory;
  -import org.apache.excalibur.meta.info.Type;
  -import org.apache.excalibur.meta.info.DependencyDescriptor;
   import org.apache.excalibur.meta.info.ReferenceDescriptor;
   
   /**
  
  
  
  1.3       +7 -2      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/ExploitationManager.java
  
  Index: ExploitationManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/ExploitationManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExploitationManager.java	22 Aug 2002 05:34:31 -0000	1.2
  +++ ExploitationManager.java	22 Aug 2002 13:43:02 -0000	1.3
  @@ -49,11 +49,14 @@
       * Handle the creation stage.
       * @param object the object to handle
       * @param context the extension stage context
  +    * @exception Exception if a stage execution error occurs
       */
       public void create( Object object, Context context ) throws Exception
       {
           if( object instanceof Exploitable )
  -          ((Exploitable)object).incarnate();
  +        {
  +            ((Exploitable)object).incarnate();
  +        }
       }
   
      /**
  @@ -64,6 +67,8 @@
       public void destroy( Object object, Context context )
       {
           if( object instanceof Exploitable )
  -          ((Exploitable)object).etherialize();
  +        {
  +            ((Exploitable)object).etherialize();
  +        }
       }
   }
  
  
  
  1.3       +8 -6      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/SimpleComponent.java
  
  Index: SimpleComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/SimpleComponent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleComponent.java	22 Aug 2002 05:34:31 -0000	1.2
  +++ SimpleComponent.java	22 Aug 2002 13:43:02 -0000	1.3
  @@ -19,13 +19,14 @@
    * @author <a href="mailto:mcconnell@osm.net">Stephen McConnell</a>
    */
   public class SimpleComponent extends AbstractLogEnabled 
  -implements Configurable, Serviceable, Initializable, Startable, SimpleService, Exploitable, Demonstratable, Disposable
  +implements Configurable, Serviceable, Initializable, Startable, SimpleService, 
  +Exploitable, Demonstratable, Disposable
   {
   
       private String m_message;
       private BasicService m_basic;
       private Thread m_thread;
  -    private boolean CONTINUE = false;
  +    private boolean m_continuation = false;
   
       //=======================================================================
       // Configurable
  @@ -48,6 +49,7 @@
      /**
       * Service the component.
       * @param manager the service manager holding the depedent services
  +    * @exception ServiceException if a service error occurs
       */
       public void service( ServiceManager manager ) throws ServiceException
       {
  @@ -109,17 +111,17 @@
   
      /**
       * Starts the component.
  -    * @exception if an error occurs
  +    * @exception Exception if an error occurs
       */
       public void start() throws Exception
       {
           getLogger().debug( "starting" );
  -        CONTINUE = true;
  +        m_continuation = true;
           m_thread = new Thread(
             new Runnable() {
               public void run()
               {
  -                while( CONTINUE )
  +                while( m_continuation )
                   {
                       try
                       {
  @@ -142,7 +144,7 @@
       public void stop()
       {
           getLogger().debug( "stopping" );
  -        CONTINUE = false;
  +        m_continuation = false;
           try
           {
               m_thread.join();
  
  
  

--
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