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/all/src/java/org/apache/avalon/excalibur/datasource JdbcConnectionPool.java
Date Sun, 07 Apr 2002 06:22:10 GMT
donaldp     02/04/06 22:22:10

  Modified:    all/src/java/org/apache/avalon/excalibur/datasource
                        JdbcConnectionPool.java
  Log:
  Use pools protected methods rather than directly accessing protected member variables
  
  Revision  Changes    Path
  1.17      +12 -8     jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/datasource/JdbcConnectionPool.java
  
  Index: JdbcConnectionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/datasource/JdbcConnectionPool.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JdbcConnectionPool.java	2 Apr 2002 14:29:15 -0000	1.16
  +++ JdbcConnectionPool.java	7 Apr 2002 06:22:10 -0000	1.17
  @@ -20,7 +20,7 @@
    * thread to manage the number of SQL Connections.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.16 $ $Date: 2002/04/02 14:29:15 $
  + * @version CVS $Revision: 1.17 $ $Date: 2002/04/07 06:22:10 $
    * @since 4.0
    */
   public class JdbcConnectionPool
  @@ -29,17 +29,21 @@
   {
       private Thread m_initThread;
       private final boolean m_autoCommit;
  -    private boolean m_noConnections = false;
  +    private boolean m_noConnections;
       private long m_wait = -1;
       private HashSet m_waitingThreads = new HashSet();
   
  -    public JdbcConnectionPool( final JdbcConnectionFactory factory, final DefaultPoolController
controller, final int min, final int max, final boolean autoCommit )
  +    public JdbcConnectionPool( final JdbcConnectionFactory factory, 
  +                               final DefaultPoolController controller, 
  +                               final int min, 
  +                               final int max, 
  +                               final boolean autoCommit )
           throws Exception
       {
           super( factory, controller, max );
           m_min = min;
   
  -        this.m_autoCommit = autoCommit;
  +        m_autoCommit = autoCommit;
       }
   
       /**
  @@ -84,13 +88,13 @@
                   try
                   {
                       curMillis = System.currentTimeMillis();
  -                    m_mutex.release();
  +                    unlock();
   
                       thread.wait( endTime - curMillis );
                   }
                   finally
                   {
  -                    m_mutex.acquire();
  +                    lock();
                   }
   
                   try
  @@ -143,7 +147,7 @@
   
               try
               {
  -                m_mutex.acquire();
  +                lock();
                   if( m_active.contains( obj ) )
                   {
                       m_active.remove( obj );
  @@ -165,7 +169,7 @@
               }
               finally
               {
  -                m_mutex.release();
  +                unlock();
               }
           }
   
  
  
  

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