avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon/src/java/org/apache/avalon/util/datasource JdbcConnectionPool.java
Date Fri, 16 Mar 2001 15:22:23 GMT
bloritsch    01/03/16 07:22:23

  Modified:    src/java/org/apache/avalon/util/datasource
                        JdbcConnectionPool.java
  Log:
  Fixed logic error in validation code.
  
  Revision  Changes    Path
  1.7       +7 -6      jakarta-avalon/src/java/org/apache/avalon/util/datasource/JdbcConnectionPool.java
  
  Index: JdbcConnectionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/util/datasource/JdbcConnectionPool.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JdbcConnectionPool.java	2001/03/16 15:14:07	1.6
  +++ JdbcConnectionPool.java	2001/03/16 15:22:18	1.7
  @@ -26,7 +26,7 @@
    * thread to manage the number of SQL Connections.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.6 $ $Date: 2001/03/16 15:14:07 $
  + * @version CVS $Revision: 1.7 $ $Date: 2001/03/16 15:22:18 $
    */
   public class JdbcConnectionPool
       extends AbstractLoggable
  @@ -108,7 +108,8 @@
       public Poolable get()
           throws Exception
       {
  -        if (!m_initialized) {
  +        if (! m_initialized)
  +        {
               if (m_initThread == null)
               {
                   throw new IllegalStateException("You cannot get a Connection before the
pool is initialized");
  @@ -119,7 +120,8 @@
               }
           }
           
  -        if (!m_disposed) {
  +        if (m_disposed)
  +        {
               throw new IllegalStateException("You cannot get a Connection after the pool
is disposed");
           }
           
  @@ -162,7 +164,7 @@
           m_lock.lock(m_active);
           m_active.remove( obj );
   
  -        if( ! m_disposed )
  +        if(! m_disposed)
           {
               m_lock.lock(m_ready);
               m_ready.add( obj );
  @@ -195,9 +197,8 @@
   
       public void dispose()
       {
  -        m_disposed = true;
  -
           m_lock.lock(m_ready);
  +        m_disposed = true;
   
           while( ! m_ready.isEmpty() )
           {
  
  
  

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