User: oleg    
  Date: 00/11/10 05:32:14

  Modified:    src/main/org/jboss/minerva/jdbc ConnectionInPool.java
  Log:
  con is set to null at the end of reset() so that PreparedConnections can return to 
the pool.
  Aaron, thanks for consultation.
  
  Revision  Changes    Path
  1.7       +3 -5      jboss/src/main/org/jboss/minerva/jdbc/ConnectionInPool.java
  
  Index: ConnectionInPool.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/minerva/jdbc/ConnectionInPool.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ConnectionInPool.java     2000/11/09 13:45:26     1.6
  +++ ConnectionInPool.java     2000/11/10 13:32:14     1.7
  @@ -29,7 +29,7 @@
    * outstanding statements are closed, and the connection is rolled back.  This
    * class is also used by statements, etc. to update the last used time for the
    * connection.
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    * @author Aaron Mulder ([EMAIL PROTECTED])
    */
   public class ConnectionInPool implements PooledObject, ConnectionWrapper {
  @@ -138,16 +138,14 @@
        * rolled back.  No further SQL calls are possible once this is called.
        */
       public void reset() throws SQLException {
  -        Connection local = con;
  -
           Collection copy = (Collection)statements.clone();
           Iterator it = copy.iterator();
           while(it.hasNext())
               try {
                   ((Statement)it.next()).close();
               } catch(SQLException e) {}
  -        if(!local.getAutoCommit())
  -            local.rollback();
  +        if(!con.getAutoCommit())
  +            con.rollback();
           con = null;
       }
   
  
  
  

Reply via email to