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/handler AbstractComponentHandler.java FactoryComponentHandler.java PerThreadComponentHandler.java PoolableComponentHandler.java ThreadSafeComponentHandler.java
Date Fri, 08 Nov 2002 00:21:43 GMT
donaldp     2002/11/07 16:21:43

  Modified:    fortress/src/java/org/apache/excalibur/fortress/handler
                        AbstractComponentHandler.java
                        FactoryComponentHandler.java
                        PerThreadComponentHandler.java
                        PoolableComponentHandler.java
                        ThreadSafeComponentHandler.java
  Log:
  Rework disposal to be subclass friendly.
  
  Revision  Changes    Path
  1.22      +4 -1      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/AbstractComponentHandler.java
  
  Index: AbstractComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/AbstractComponentHandler.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- AbstractComponentHandler.java	8 Nov 2002 00:19:04 -0000	1.21
  +++ AbstractComponentHandler.java	8 Nov 2002 00:21:43 -0000	1.22
  @@ -279,6 +279,7 @@
        */
       public void dispose()
       {
  +        doDispose();
           try
           {
               ContainerUtil.dispose( m_factory );
  @@ -295,6 +296,8 @@
   
           m_disposed = true;
       }
  +
  +    protected abstract void doDispose();
   
       /**
        * Represents the handler as a string.
  
  
  
  1.31      +5 -1      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/FactoryComponentHandler.java
  
  Index: FactoryComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/FactoryComponentHandler.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- FactoryComponentHandler.java	8 Nov 2002 00:19:04 -0000	1.30
  +++ FactoryComponentHandler.java	8 Nov 2002 00:21:43 -0000	1.31
  @@ -100,4 +100,8 @@
       {
           disposeComponent( component );
       }
  +
  +    protected void doDispose()
  +    {
  +    }
   }
  
  
  
  1.34      +2 -7      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PerThreadComponentHandler.java
  
  Index: PerThreadComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PerThreadComponentHandler.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- PerThreadComponentHandler.java	8 Nov 2002 00:19:04 -0000	1.33
  +++ PerThreadComponentHandler.java	8 Nov 2002 00:21:43 -0000	1.34
  @@ -108,15 +108,10 @@
           //Do nothing
       }
   
  -    /**
  -     * Dispose of the ComponentHandler and any associated Pools and
  -     * Factories.
  -     */
  -    public void dispose()
  +    protected void doDispose()
       {
           disposeComponent( m_instance );
           m_instance = null;
  -        super.dispose();
       }
   
       private static final class ThreadLocalComponent
  
  
  
  1.34      +2 -7      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PoolableComponentHandler.java
  
  Index: PoolableComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PoolableComponentHandler.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- PoolableComponentHandler.java	8 Nov 2002 00:16:56 -0000	1.33
  +++ PoolableComponentHandler.java	8 Nov 2002 00:21:43 -0000	1.34
  @@ -124,12 +124,7 @@
           m_pool.release( component );
       }
   
  -    /**
  -     * Dispose of the ComponentHandler and any associated Pools and Factories.
  -     */
  -    public void dispose()
  +    protected void doDispose()
       {
  -        super.dispose();
  -        // REVISIT: release m_pool ? m_pool = null;
       }
   }
  
  
  
  1.33      +2 -3      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ThreadSafeComponentHandler.java
  
  Index: ThreadSafeComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ThreadSafeComponentHandler.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- ThreadSafeComponentHandler.java	8 Nov 2002 00:16:56 -0000	1.32
  +++ ThreadSafeComponentHandler.java	8 Nov 2002 00:21:43 -0000	1.33
  @@ -115,10 +115,9 @@
       /**
        * Dispose of the ComponentHandler and any associated Pools and Factories.
        */
  -    public void dispose()
  +    protected void doDispose()
       {
           disposeComponent( m_instance );
           m_instance = null;
  -        super.dispose();
       }
   }
  
  
  

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