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/merlin/kernel DefaultKernel.java
Date Mon, 05 Aug 2002 13:37:45 GMT
mcconnell    2002/08/05 06:37:45

  Modified:    assembly/src/java/org/apache/excalibur/merlin/kernel
                        DefaultKernel.java
  Log:
  Enhancement to Kernel related to recognition of root status.
  
  Revision  Changes    Path
  1.30      +17 -1     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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- DefaultKernel.java	5 Aug 2002 12:39:37 -0000	1.29
  +++ DefaultKernel.java	5 Aug 2002 13:37:45 -0000	1.30
  @@ -187,6 +187,13 @@
       private boolean m_stopped = false;
       private boolean m_disposed = false;
   
  +   /**
  +    * Flag indicating is this kernel is really a root kernel or a kernel embeded in
  +    * another container.  If we are embeded then loging infoprmation is realative 
  +    * otherwise the kernel's root container logs at top level.
  +    */
  +    private boolean m_root = true;
  +
       //=======================================================================
       // Contextualizable
       //=======================================================================
  @@ -233,6 +240,15 @@
               CategoriesDescriptor categories = 
                 m_creator.createCategoriesDescriptor( name, m_config.getChild("categories")
);
   
  +            if( Thread.currentThread().getContextClassLoader() instanceof ContainerManager
)
  +            {
  +                m_root = true;
  +            }
  +            else
  +            {
  +                m_root = false;
  +            }
  +
               m_manager = new ContainerManager( name );
               ctx.put( ContainerManager.LOGGING_DESCRIPTOR_KEY, loggingDescriptor );
               ctx.put( ContainerManager.CATEGORIES_DESCRIPTOR_KEY, categories );
  @@ -298,7 +314,7 @@
                   activation, ContainerDescriptor.EXPLICIT, classpath 
                 );
   
  -            manager = m_manager.createContainerManager( descriptor, true );
  +            manager = m_manager.createContainerManager( descriptor, m_root );
           }
           catch( Throwable e )
           {
  
  
  

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