avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup FortressServiceManager.java FortressServiceSelector.java
Date Fri, 08 Nov 2002 00:54:14 GMT
donaldp     2002/11/07 16:54:14

  Modified:    fortress/src/java/org/apache/excalibur/fortress
                        AbstractContainer.java
               fortress/src/java/org/apache/excalibur/fortress/container/commands
                        DisposeComponentHandlerCommand.java
                        InitializeComponentHandlerCommand.java
               fortress/src/java/org/apache/excalibur/fortress/handler
                        ComponentHandler.java
               fortress/src/java/org/apache/excalibur/fortress/lookup
                        FortressServiceManager.java
                        FortressServiceSelector.java
  Log:
  Remove Initialize/Dispose from work interface of handler.
  
  Revision  Changes    Path
  1.64      +5 -4      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java
  
  Index: AbstractContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- AbstractContainer.java	24 Oct 2002 11:25:10 -0000	1.63
  +++ AbstractContainer.java	8 Nov 2002 00:54:14 -0000	1.64
  @@ -450,7 +450,7 @@
                       }
                       else
                       {
  -                        handler.initialize();
  +                        ContainerUtil.initialize( handler );
                       }
                   }
                   else
  @@ -497,12 +497,13 @@
   
           while( i.hasNext() )
           {
  +            final ComponentHandler handler = (ComponentHandler)i.next();
               if( null != m_commandQueue )
               {
                   try
                   {
                       m_commandQueue.enqueue(
  -                        new DisposeComponentHandlerCommand( (ComponentHandler)i.next(),
  +                        new DisposeComponentHandlerCommand( handler,
                                                               getLogger() )
                       );
   
  @@ -518,7 +519,7 @@
               }
               else
               {
  -                ( (ComponentHandler)i.next() ).dispose();
  +                ContainerUtil.dispose( handler );
               }
           }
       }
  
  
  
  1.4       +3 -2      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/commands/DisposeComponentHandlerCommand.java
  
  Index: DisposeComponentHandlerCommand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/commands/DisposeComponentHandlerCommand.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DisposeComponentHandlerCommand.java	2 Oct 2002 01:47:00 -0000	1.3
  +++ DisposeComponentHandlerCommand.java	8 Nov 2002 00:54:14 -0000	1.4
  @@ -51,6 +51,7 @@
   
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.logger.NullLogger;
  +import org.apache.avalon.framework.container.ContainerUtil;
   import org.apache.excalibur.event.command.Command;
   import org.apache.excalibur.fortress.handler.ComponentHandler;
   
  @@ -75,7 +76,7 @@
       {
           if( m_handler.isInitialized() )
           {
  -            m_handler.dispose();
  +            ContainerUtil.dispose( m_handler );
   
               if( m_logger.isDebugEnabled() )
               {
  
  
  
  1.4       +3 -2      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/commands/InitializeComponentHandlerCommand.java
  
  Index: InitializeComponentHandlerCommand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/commands/InitializeComponentHandlerCommand.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InitializeComponentHandlerCommand.java	2 Oct 2002 01:47:00 -0000	1.3
  +++ InitializeComponentHandlerCommand.java	8 Nov 2002 00:54:14 -0000	1.4
  @@ -51,6 +51,7 @@
   
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.logger.NullLogger;
  +import org.apache.avalon.framework.container.ContainerUtil;
   import org.apache.excalibur.event.command.Command;
   import org.apache.excalibur.fortress.handler.ComponentHandler;
   
  @@ -78,7 +79,7 @@
           {
               if( !m_handler.isInitialized() )
               {
  -                m_handler.initialize();
  +                ContainerUtil.initialize( m_handler );
   
                   if( m_logger.isDebugEnabled() )
                   {
  
  
  
  1.16      +1 -4      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentHandler.java
  
  Index: ComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentHandler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ComponentHandler.java	13 Aug 2002 07:57:26 -0000	1.15
  +++ ComponentHandler.java	8 Nov 2002 00:54:14 -0000	1.16
  @@ -49,8 +49,6 @@
   */
   package org.apache.excalibur.fortress.handler;
   
  -import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.service.ServiceManager;
  @@ -66,7 +64,6 @@
    * @since 4.0
    */
   public interface ComponentHandler
  -    extends Initializable, Disposable
   {
       Class[] HANDLER_CONSTRUCTOR = new Class[]{
           Class.class,
  
  
  
  1.19      +5 -6      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java
  
  Index: FortressServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FortressServiceManager.java	7 Nov 2002 08:42:22 -0000	1.18
  +++ FortressServiceManager.java	8 Nov 2002 00:54:14 -0000	1.19
  @@ -49,7 +49,7 @@
   */
   package org.apache.excalibur.fortress.lookup;
   
  -import org.apache.commons.collections.StaticBucketMap;
  +import java.util.Map;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.ComponentSelector;
   import org.apache.avalon.framework.context.Context;
  @@ -58,14 +58,13 @@
   import org.apache.avalon.framework.service.ServiceSelector;
   import org.apache.avalon.framework.service.WrapperServiceManager;
   import org.apache.avalon.framework.service.WrapperServiceSelector;
  -import org.apache.excalibur.container.legacy.*;
  +import org.apache.avalon.framework.container.ContainerUtil;
  +import org.apache.commons.collections.StaticBucketMap;
   import org.apache.excalibur.container.lookup.AbstractServiceManager;
   import org.apache.excalibur.fortress.Container;
   import org.apache.excalibur.fortress.handler.ComponentHandler;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
   
  -import java.util.Map;
  -
   /**
    * This is the Default ServiceManager for the Container.  It provides
    * a very simple abstraction, and makes it easy for the Container to manage
  @@ -165,7 +164,7 @@
           {
               if( !handler.isInitialized() )
               {
  -                handler.initialize();
  +                ContainerUtil.initialize( handler );
               }
   
               component = handler.get();
  
  
  
  1.12      +3 -2      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java
  
  Index: FortressServiceSelector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FortressServiceSelector.java	7 Nov 2002 23:46:03 -0000	1.11
  +++ FortressServiceSelector.java	8 Nov 2002 00:54:14 -0000	1.12
  @@ -53,6 +53,7 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceSelector;
  +import org.apache.avalon.framework.container.ContainerUtil;
   import org.apache.excalibur.fortress.Container;
   import org.apache.excalibur.fortress.handler.ComponentHandler;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
  @@ -106,7 +107,7 @@
           {
               if( !handler.isInitialized() )
               {
  -                handler.initialize();
  +                ContainerUtil.initialize(handler );
               }
   
               final Object component = handler.get();
  
  
  

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