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/proposal/4.0/src/java/org/apache/avalon/thread ThreadPool.java WorkerThread.java
Date Thu, 15 Mar 2001 03:10:20 GMT
donaldp     01/03/14 19:10:20

  Modified:    proposal/4.0/src/java/org/apache/avalon changes.txt
               proposal/4.0/src/java/org/apache/avalon/camelot
                        AbstractCamelotDeployer.java AbstractContainer.java
                        AbstractDeployer.java DefaultFactory.java
               proposal/4.0/src/java/org/apache/avalon/component
                        ComponentException.java ComponentManager.java
                        ComponentSelector.java Composer.java
                        DefaultComponentManager.java
                        DefaultComponentSelector.java
               proposal/4.0/src/java/org/apache/avalon/datasource
                        JdbcConnection.java JdbcConnectionPool.java
                        JdbcDataSource.java
               proposal/4.0/src/java/org/apache/avalon/thread
                        ThreadPool.java WorkerThread.java
  Removed:     proposal/4.0/src/java/org/apache/avalon
                        AbstractLoggable.java Loggable.java
  Log:
  Moved *Loggable to org.apache.avalon.logger
  Made the ComponentManager throw ComponentException again
  
  Revision  Changes    Path
  1.8       +3 -1      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/changes.txt
  
  Index: changes.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/changes.txt,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- changes.txt	2001/03/15 02:48:14	1.7
  +++ changes.txt	2001/03/15 03:10:11	1.8
  @@ -35,4 +35,6 @@
   
   PD:
   -Removed utility classes as not generic enough
  --Removed ComponentNot*Exceptions
  \ No newline at end of file
  +-Removed ComponentNot*Exceptions
  +-Moved *Loggable to org.apache.avalon.logger
  +-Made the ComponentManager throw ComponentException again
  \ No newline at end of file
  
  
  
  1.3       +17 -20    jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/AbstractCamelotDeployer.java
  
  Index: AbstractCamelotDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/AbstractCamelotDeployer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractCamelotDeployer.java	2001/02/27 11:02:32	1.2
  +++ AbstractCamelotDeployer.java	2001/03/15 03:10:12	1.3
  @@ -9,6 +9,7 @@
   
   import java.net.URL;
   import org.apache.avalon.component.ComponentManager;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.component.Composer;
   import org.apache.avalon.container.DeploymentException;
   import org.apache.avalon.container.ContainerException;
  @@ -40,30 +41,26 @@
        * Retrieve relevent services needed to deploy.
        *
        * @param componentManager the ComponentManager
  -     * @exception ComponentNotFoundException if an error occurs
  -     * @exception ComponentNotAccessibleException if an error occurs
        */
       public void compose( final ComponentManager componentManager )
  +        throws ComponentException
       {
  -        try {
  -            if( m_deployToLocatorRegistry )
  -            {
  -                m_locatorRegistry = (LocatorRegistry)componentManager.
  -                    lookup( "org.apache.avalon.container.LocatorRegistry" );
  -            }
  +        if( m_deployToLocatorRegistry )
  +        {
  +            m_locatorRegistry = (LocatorRegistry)componentManager.
  +                lookup( "org.apache.avalon.container.LocatorRegistry" );
  +        }
       
  -            if( m_deployToInfoRegistry )
  -            {
  -                m_infoRegistry = (Registry)componentManager.
  -                    lookup( "org.apache.avalon.container.Registry" );
  -            }
  -    
  -            if( m_deployToContainer )
  -            {
  -                m_container = (Container)componentManager.
  -                    lookup( "org.apache.avalon.container.Container" );
  -            }
  -        } catch (Exception e) {
  +        if( m_deployToInfoRegistry )
  +        {
  +            m_infoRegistry = (Registry)componentManager.
  +                lookup( "org.apache.avalon.container.Registry" );
  +        }
  +        
  +        if( m_deployToContainer )
  +        {
  +            m_container = (Container)componentManager.
  +                lookup( "org.apache.avalon.container.Container" );
           }
       }
   
  
  
  
  1.3       +2 -2      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/AbstractContainer.java
  
  Index: AbstractContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/AbstractContainer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractContainer.java	2001/02/27 11:02:32	1.2
  +++ AbstractContainer.java	2001/03/15 03:10:12	1.3
  @@ -9,11 +9,11 @@
   
   import java.util.HashMap;
   import java.util.Iterator;
  -import org.apache.avalon.AbstractLoggable;
   import org.apache.avalon.component.Component;
  +import org.apache.avalon.container.Container;
   import org.apache.avalon.container.ContainerException;
   import org.apache.avalon.container.Entry;
  -import org.apache.avalon.container.Container;
  +import org.apache.avalon.logger.AbstractLoggable;
   
   /**
    * This contains it during execution and may provide certain 
  
  
  
  1.3       +1 -1      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/AbstractDeployer.java
  
  Index: AbstractDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/AbstractDeployer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractDeployer.java	2001/02/27 11:02:33	1.2
  +++ AbstractDeployer.java	2001/03/15 03:10:13	1.3
  @@ -14,7 +14,7 @@
   import java.io.OutputStream;
   import java.net.URL;
   import java.util.HashMap;
  -import org.apache.avalon.AbstractLoggable;
  +import org.apache.avalon.logger.AbstractLoggable;
   import org.apache.avalon.component.Component;
   import org.apache.avalon.component.ComponentNotFoundException;
   import org.apache.aut.io.FileUtil;
  
  
  
  1.3       +3 -3      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/DefaultFactory.java
  
  Index: DefaultFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/camelot/DefaultFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultFactory.java	2001/02/27 11:02:36	1.2
  +++ DefaultFactory.java	2001/03/15 03:10:13	1.3
  @@ -10,11 +10,11 @@
   import java.net.URL;
   import java.util.HashMap;
   import org.apache.avalon.component.Component;
  -import org.apache.avalon.AbstractLoggable;
  -import org.apache.avalon.container.Loader;
  -import org.apache.avalon.container.FactoryException;
   import org.apache.avalon.container.Factory;
  +import org.apache.avalon.container.FactoryException;
  +import org.apache.avalon.container.Loader;
   import org.apache.avalon.container.Locator;
  +import org.apache.avalon.logger.AbstractLoggable;
   
   
   
  
  
  
  1.3       +5 -0      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/ComponentException.java
  
  Index: ComponentException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/ComponentException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ComponentException.java	2001/02/26 00:41:38	1.2
  +++ ComponentException.java	2001/03/15 03:10:14	1.3
  @@ -20,6 +20,11 @@
   public class ComponentException 
       extends CascadingException
   {
  +    public ComponentException( final String message )
  +    {
  +        this( message, null );
  +    }
  +
       /**
        * Construct a new <code>ComponentException</code> instance.
        */
  
  
  
  1.2       +2 -6      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/ComponentManager.java
  
  Index: ComponentManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/ComponentManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentManager.java	2001/02/25 10:45:43	1.1
  +++ ComponentManager.java	2001/03/15 03:10:14	1.2
  @@ -59,14 +59,10 @@
        *
        * @param name The role name of the <code>Component</code> to retrieve.
        *
  -     * @exception ComponentNotFoundException If the given role is not associated
  -     *                                       with a <code>Component</code>.
  -     * @exception ComponentNotAccessibleException If a <code>Component</code>
  -     *                                            instance cannot be created.
  +     * @exception ComponentException on error
        */
       Component lookup( String role ) 
  -        throws ComponentNotFoundException, 
  -               ComponentNotAccessibleException;
  +        throws ComponentException;
   
       /**
        * Return the <code>Component</code> when you are finished with it.  This
  
  
  
  1.2       +2 -3      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/ComponentSelector.java
  
  Index: ComponentSelector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/ComponentSelector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentSelector.java	2001/02/25 10:45:43	1.1
  +++ ComponentSelector.java	2001/03/15 03:10:14	1.2
  @@ -61,8 +61,7 @@
        *                                            instance cannot be created.
        */
       Component select( Object hint ) 
  -        throws ComponentNotFoundException, 
  -               ComponentNotAccessibleException;
  +        throws ComponentException;
   
       /**
        * Return the <code>Component</code> when you are finished with it.  This
  @@ -73,5 +72,5 @@
        *
        * @param component The Component we are releasing.
        */
  -    void release(Component component);
  +    void release( Component component );
   }
  
  
  
  1.2       +2 -1      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/Composer.java
  
  Index: Composer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/Composer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Composer.java	2001/02/25 10:45:43	1.1
  +++ Composer.java	2001/03/15 03:10:15	1.2
  @@ -38,5 +38,6 @@
        * @param manager The <code>ComponentManager</code> which this
        *                <code>Composer</code> uses.
        */
  -    void compose( ComponentManager componentManager );
  +    void compose( ComponentManager componentManager ) 
  +        throws ComponentException;
   }
  
  
  
  1.2       +2 -3      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/DefaultComponentManager.java
  
  Index: DefaultComponentManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/DefaultComponentManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultComponentManager.java	2001/02/25 10:45:43	1.1
  +++ DefaultComponentManager.java	2001/03/15 03:10:15	1.2
  @@ -35,8 +35,7 @@
       }
   
       public Component lookup( final String role )
  -        throws ComponentNotFoundException, 
  -               ComponentNotAccessibleException
  +        throws ComponentException
       {
           final Component component = (Component)m_components.get( role );
   
  @@ -50,7 +49,7 @@
           }
           else
           {
  -            throw new ComponentNotFoundException("Unable to provide implementation for
" + role);
  +            throw new ComponentException("Unable to provide implementation for " + role);
           }
       }
   
  
  
  
  1.2       +3 -3      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/DefaultComponentSelector.java
  
  Index: DefaultComponentSelector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/component/DefaultComponentSelector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultComponentSelector.java	2001/02/25 10:45:43	1.1
  +++ DefaultComponentSelector.java	2001/03/15 03:10:15	1.2
  @@ -25,15 +25,15 @@
        * should it.
        */
       public Component select(Object hint)
  -    throws ComponentNotFoundException,
  -           ComponentNotAccessibleException {
  +        throws ComponentException {
   
           final Component component = (Component) components.get(hint);
   
           if ( component != null ) {
               return component;
           } else {
  -            throw new ComponentNotFoundException("Unable to provide implementation for
" + hint.toString());
  +            throw new ComponentException( "Unable to provide implementation for " + 
  +                                          hint.toString() );
           }
       }
   
  
  
  
  1.3       +2 -2      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcConnection.java
  
  Index: JdbcConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcConnection.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JdbcConnection.java	2001/02/26 00:42:45	1.2
  +++ JdbcConnection.java	2001/03/15 03:10:17	1.3
  @@ -15,8 +15,8 @@
   import java.sql.SQLWarning;
   import java.sql.Statement;
   import java.util.Map;
  -import org.apache.avalon.AbstractLoggable;
   import org.apache.avalon.Recyclable;
  +import org.apache.avalon.logger.AbstractLoggable;
   import org.apache.avalon.pool.Pool;
   import org.apache.avalon.pool.Poolable;
    
  @@ -29,7 +29,7 @@
    * total number of Connection objects that are created.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2001/02/26 00:42:45 $
  + * @version CVS $Revision: 1.3 $ $Date: 2001/03/15 03:10:17 $
    */
   public class JdbcConnection 
       extends AbstractLoggable
  
  
  
  1.4       +2 -2      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcConnectionPool.java
  
  Index: JdbcConnectionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcConnectionPool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JdbcConnectionPool.java	2001/02/26 06:05:55	1.3
  +++ JdbcConnectionPool.java	2001/03/15 03:10:17	1.4
  @@ -12,10 +12,10 @@
   import java.sql.SQLException;
   import java.util.ArrayList;
   import java.util.List;
  -import org.apache.avalon.AbstractLoggable;
   import org.apache.avalon.Recyclable;
   import org.apache.avalon.lifecycle.Disposable;
   import org.apache.avalon.lifecycle.Initializable;
  +import org.apache.avalon.logger.AbstractLoggable;
   import org.apache.avalon.pool.Pool;
   import org.apache.avalon.pool.Poolable;
   
  @@ -24,7 +24,7 @@
    * thread to manage the number of SQL Connections.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2001/02/26 06:05:55 $
  + * @version CVS $Revision: 1.4 $ $Date: 2001/03/15 03:10:17 $
    */
   public class JdbcConnectionPool
       extends AbstractLoggable
  
  
  
  1.3       +2 -2      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcDataSource.java
  
  Index: JdbcDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcDataSource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JdbcDataSource.java	2001/02/26 06:05:56	1.2
  +++ JdbcDataSource.java	2001/03/15 03:10:17	1.3
  @@ -9,10 +9,10 @@
   
   import java.sql.Connection;
   import java.sql.SQLException;
  -import org.apache.avalon.AbstractLoggable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
   import org.apache.avalon.lifecycle.Disposable;
  +import org.apache.avalon.logger.AbstractLoggable;
   
   /**
    * The Default implementation for DataSources in Avalon.  This uses the
  @@ -20,7 +20,7 @@
    * <code>java.sql.DriverManager</code>.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2001/02/26 06:05:56 $
  + * @version CVS $Revision: 1.3 $ $Date: 2001/03/15 03:10:17 $
    */
   public class JdbcDataSource 
       extends AbstractLoggable
  
  
  
  1.3       +2 -2      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/thread/ThreadPool.java
  
  Index: ThreadPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/thread/ThreadPool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ThreadPool.java	2001/02/26 00:43:49	1.2
  +++ ThreadPool.java	2001/03/15 03:10:18	1.3
  @@ -7,9 +7,9 @@
    */
   package org.apache.avalon.thread;
   
  -import org.apache.avalon.Loggable;
  -import org.apache.avalon.pool.Poolable;
  +import org.apache.avalon.logger.Loggable;
   import org.apache.avalon.pool.ObjectFactory;
  +import org.apache.avalon.pool.Poolable;
   import org.apache.avalon.pool.ThreadSafePool;
   import org.apache.log.Logger;
   
  
  
  
  1.3       +1 -1      jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/thread/WorkerThread.java
  
  Index: WorkerThread.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/thread/WorkerThread.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WorkerThread.java	2001/02/26 00:43:49	1.2
  +++ WorkerThread.java	2001/03/15 03:10:19	1.3
  @@ -7,7 +7,7 @@
    */
   package org.apache.avalon.thread;
   
  -import org.apache.avalon.Loggable;
  +import org.apache.avalon.logger.Loggable;
   import org.apache.avalon.pool.Poolable;
   import org.apache.avalon.pool.ThreadSafePool;
   import org.apache.log.Logger;
  
  
  

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