You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/08/06 22:06:04 UTC

cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util ContextBuilder.java ContextManager.java ContextManagerConstants.java

bloritsch    2002/08/06 13:06:04

  Modified:    fortress/src/java/org/apache/excalibur/fortress/util
                        ContextBuilder.java ContextManager.java
                        ContextManagerConstants.java
  Log:
  Remove all ComponentManager stuff for creating a container.  It is new code, so the new stuff should only support the current APIs.  It should still be able to handle Composable components, but the containers should be Serviceable
  
  Revision  Changes    Path
  1.21      +1 -29     jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextBuilder.java
  
  Index: ContextBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextBuilder.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ContextBuilder.java	6 Aug 2002 19:41:19 -0000	1.20
  +++ ContextBuilder.java	6 Aug 2002 20:06:04 -0000	1.21
  @@ -148,37 +148,9 @@
           context.put( COMMAND_QUEUE, commandQueue );
       }
   
  -    public void setComponentManagerParent( ComponentManager componentManager )
  -    {
  -        try
  -        {
  -            context.get( SERVICE_MANAGER_PARENT );
  -
  -            throw new IllegalStateException( "ServiceManagerParent already specified" );
  -        }
  -        catch ( ContextException e )
  -        {
  -            context.put( COMPONENT_MANAGER_PARENT, componentManager );
  -        }
  -    }
  -
  -    public void setComponentManager( ComponentManager componentManager )
  -    {
  -        context.put( COMPONENT_MANAGER, componentManager );
  -    }
  -
       public void setServiceManagerParent( ServiceManager serviceManager )
       {
  -        try
  -        {
  -            context.get( COMPONENT_MANAGER_PARENT );
  -
  -            throw new IllegalStateException( "ComponentManagerParent already specified" );
  -        }
  -        catch ( ContextException e )
  -        {
  -            context.put( SERVICE_MANAGER_PARENT, serviceManager );
  -        }
  +        context.put( SERVICE_MANAGER_PARENT, serviceManager );
       }
   
       public void setServiceManager( ServiceManager componentManager )
  
  
  
  1.30      +1 -54     jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- ContextManager.java	6 Aug 2002 19:41:19 -0000	1.29
  +++ ContextManager.java	6 Aug 2002 20:06:04 -0000	1.30
  @@ -225,7 +225,6 @@
           initializeOwnComponentManager();
           initializeLoggerManager();
           initializeRoleManager();
  -        initializeComponentManager();
           initializeServiceManager();
           initializeCommandQueue();
           initializePoolManager();
  @@ -352,58 +351,6 @@
           catch( ContextException ce )
           {
               return defaultValue;
  -        }
  -    }
  -
  -    /**
  -     * Will set up a ComponentLocator if none is supplied.
  -     *
  -     * <p>The postcondition is that
  -     * <code>childContext.get( Container.COMPONENT_MANAGER )</code>
  -     * should return a valid logger manager.</p>
  -     *
  -     * @throws Exception if the <code>ComponentManager</code> cannot be
  -     *         created.
  -     */
  -    protected void initializeComponentManager() throws Exception
  -    {
  -        try
  -        {
  -            childContext.put( COMPONENT_MANAGER, rootContext.get( COMPONENT_MANAGER ) );
  -            return;
  -        }
  -        catch( ContextException ce )
  -        {
  -        }
  -
  -        // See if we can inherit from the parent...
  -        try
  -        {
  -            childContext.get( COMPONENT_MANAGER );
  -
  -            // OK, done.
  -            return;
  -        }
  -        catch( ContextException ce )
  -        {
  -            // No ComponentLocator available anywhere. (Set one up.)
  -        }
  -
  -        /*
  -         * TODO: Load configuration from COMPONENT_MANAGER_CONFIGURATION or
  -         *       COMPONENT_MANAGER_CONFIGURATION_URI and create a proper CM
  -         *       from those (ECM?). Need a container CM for that, though. /LS
  -         *
  -         * No, if there is no parent CM, then there is no parent Container.
  -         * Therefore, there is no need for a new CM here.  -BL
  -         */
  -        final ComponentManager parent = (ComponentManager)get( rootContext, COMPONENT_MANAGER_PARENT, null );
  -
  -        if( null != parent ) //Don't waste time if we don't have a parent
  -        {
  -            ComponentManager cm = new DefaultComponentManager( parent );
  -            assumeOwnership( cm );
  -            containerManagerContext.put( COMPONENT_MANAGER, cm );
           }
       }
   
  
  
  
  1.10      +2 -5      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManagerConstants.java
  
  Index: ContextManagerConstants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManagerConstants.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ContextManagerConstants.java	6 Aug 2002 19:41:19 -0000	1.9
  +++ ContextManagerConstants.java	6 Aug 2002 20:06:04 -0000	1.10
  @@ -72,9 +72,6 @@
   
       String CONFIGURATION_URI = "container.configuration.uri";
   
  -    String COMPONENT_MANAGER_CLASS = "container.componentManager.config";
  -    String COMPONENT_MANAGER_CONFIGURATION = "container.componentManager.config";
  -    String COMPONENT_MANAGER_PARENT = "container.componentManager.parent";
       String SERVICE_MANAGER_PARENT = "container.serviceManager.parent";
  -    String COMPONENT_MANAGER_CONFIGURATION_URI = "container.componentManager.config.uri";
  +    String SERVICE_MANAGER_CONFIGURATION_URI = "container.componentManager.config.uri";
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>