commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp PoolableConnectionFactory.java
Date Sat, 29 Jun 2002 16:46:02 GMT
glenn       2002/06/29 09:46:02

  Modified:    dbcp/src/java/org/apache/commons/dbcp
                        PoolableConnectionFactory.java
  Log:
  Connection setAutoCommit() and setReadOnly() is only needed in activateObject()
  
  Revision  Changes    Path
  1.4       +4 -24     jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
  
  Index: PoolableConnectionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PoolableConnectionFactory.java	16 May 2002 21:25:38 -0000	1.3
  +++ PoolableConnectionFactory.java	29 Jun 2002 16:46:02 -0000	1.4
  @@ -182,16 +182,6 @@
   
       synchronized public Object makeObject() throws Exception {
           Connection conn = _connFactory.createConnection();
  -        try {
  -            conn.setAutoCommit(_defaultAutoCommit);
  -        } catch(SQLException e) {
  -            ; // ignored for now
  -        }
  -        try {
  -            conn.setReadOnly(_defaultReadOnly);
  -        } catch(SQLException e) {
  -            ; // ignored for now
  -        }
           if(null != _stmtPoolFactory) {
               KeyedObjectPool stmtpool = _stmtPoolFactory.createPool();
               conn = new PoolingConnection(conn,stmtpool);
  @@ -264,16 +254,6 @@
                   if(!conn.getAutoCommit()) {
                       conn.rollback();
                   }
  -            } catch(SQLException e) {
  -                ; // ignored
  -            }
  -            try {
  -                conn.setAutoCommit(_defaultAutoCommit);
  -            } catch(SQLException e) {
  -                ; // ignored
  -            }
  -            try {
  -                conn.setReadOnly(_defaultReadOnly);
               } catch(SQLException e) {
                   ; // ignored
               }
  
  
  

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