commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwaldh...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/jdbc2pool CPDSConnectionFactory.java KeyedCPDSConnectionFactory.java
Date Fri, 01 Nov 2002 16:03:21 GMT
rwaldhoff    2002/11/01 08:03:21

  Modified:    dbcp/src/java/org/apache/commons/dbcp/jdbc2pool
                        CPDSConnectionFactory.java
                        KeyedCPDSConnectionFactory.java
  Log:
  only log message in connectionErrorOccurred when event.getSQLException is not null.
  See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13129
  Patch suggested by Alex Roytman
  
  Revision  Changes    Path
  1.2       +9 -6      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/jdbc2pool/CPDSConnectionFactory.java
  
  Index: CPDSConnectionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/jdbc2pool/CPDSConnectionFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CPDSConnectionFactory.java	5 Aug 2002 06:42:01 -0000	1.1
  +++ CPDSConnectionFactory.java	1 Nov 2002 16:03:20 -0000	1.2
  @@ -286,8 +286,11 @@
           PooledConnection pc = (PooledConnection)event.getSource();
           try 
           {
  -            System.err
  -                .println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR");
  +            if(null != event.getSQLException()) {
  +                System.err
  +                    .println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR (" +
  +                             event.getSQLException() + ")");
  +            }
               //remove this from the listener list because we are no more 
               //interested in errors since we are about to close this connection
               pc.removeConnectionEventListener(this);
  
  
  
  1.2       +8 -5      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/jdbc2pool/KeyedCPDSConnectionFactory.java
  
  Index: KeyedCPDSConnectionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/jdbc2pool/KeyedCPDSConnectionFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KeyedCPDSConnectionFactory.java	5 Aug 2002 06:42:01 -0000	1.1
  +++ KeyedCPDSConnectionFactory.java	1 Nov 2002 16:03:21 -0000	1.2
  @@ -291,8 +291,11 @@
           PooledConnection pc = (PooledConnection)event.getSource();
           try 
           {
  -            System.err
  -                .println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR");
  +            if(null != event.getSQLException()) {
  +                System.err
  +                    .println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR (" +
  +                             event.getSQLException() + ")");
  +            }
               //remove this from the listener list because we are no more 
               //interested in errors since we are about to close this connection
               pc.removeConnectionEventListener(this);
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message