avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine PhoenixKernel.java
Date Tue, 24 Apr 2001 09:51:52 GMT
donaldp     01/04/24 02:51:52

  Modified:    src/java/org/apache/phoenix/engine PhoenixKernel.java
  Log:
  Propogate ComponentManager (and thus the SystemManager) to applications.
  
  Revision  Changes    Path
  1.7       +14 -3     jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/PhoenixKernel.java
  
  Index: PhoenixKernel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/phoenix/engine/PhoenixKernel.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PhoenixKernel.java	2001/04/23 06:32:24	1.6
  +++ PhoenixKernel.java	2001/04/24 09:51:51	1.7
  @@ -12,6 +12,8 @@
   import org.apache.avalon.atlantis.Kernel;
   import org.apache.avalon.camelot.ContainerException;
   import org.apache.avalon.camelot.Entry;
  +import org.apache.avalon.component.ComponentException;
  +import org.apache.avalon.component.ComponentManager;
   import org.apache.avalon.component.Composable;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.context.Contextualizable;
  @@ -31,13 +33,21 @@
    */
   public class PhoenixKernel
       extends AbstractKernel
  -    implements Kernel
  +    implements Kernel, Composable
   {
  +    private ComponentManager       m_componentManager;
  +
       public PhoenixKernel()
       {
           m_entryClass = ServerApplicationEntry.class;
       }
   
  +    public void compose( final ComponentManager componentManager )
  +        throws ComponentException
  +    {
  +        m_componentManager = componentManager;
  +    }
  +
       /**
        * Create a new application for kernel.
        *
  @@ -46,7 +56,7 @@
        * @return the new Application
        * @exception ContainerException if an error occurs
        */
  -    protected Application createApplicationFor( String name, Entry entry )
  +    protected Application createApplicationFor( final String name, final Entry entry )
           throws ContainerException
       {
           //It is here where you could return new EASServerApplication()
  @@ -81,7 +91,8 @@
   
               if( application instanceof Composable )
               {
  -                ((Composable)application).compose( saEntry.getComponentManager() );
  +                //CM contains reference to SystemManager
  +                ((Composable)application).compose( m_componentManager );
               }
   
               if( application instanceof Configurable )
  
  
  

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


Mime
View raw message