db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker PerformanceJdbcReferenceTest.java
Date Sun, 28 Nov 2004 08:58:21 GMT
brj         2004/11/28 00:58:21

  Modified:    src/test/org/apache/ojb/broker
                        PerformanceJdbcReferenceTest.java
  Log:
  close statement and resultset
  
  Revision  Changes    Path
  1.19      +8 -0      db-ojb/src/test/org/apache/ojb/broker/PerformanceJdbcReferenceTest.java
  
  Index: PerformanceJdbcReferenceTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PerformanceJdbcReferenceTest.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- PerformanceJdbcReferenceTest.java	27 Nov 2004 20:55:54 -0000	1.18
  +++ PerformanceJdbcReferenceTest.java	28 Nov 2004 08:58:21 -0000	1.19
  @@ -159,6 +159,7 @@
                   stmt.setInt(1, a.articleId);
                   stmt.execute();
               }
  +            stmt.close();
               conn.commit();
           }
           catch (Throwable t)
  @@ -241,8 +242,11 @@
           String table = cld.getFullTableName();
           String column = cld.getFieldDescriptorByName("articleId").getColumnName();
           String sql = "DELETE FROM " + table + " WHERE " + column + " >= " + offsetId;
  +        
           PreparedStatement stmt = conn.prepareStatement(sql);
           stmt.execute();
  +        stmt.close();
  +        
           returnConnection(conn);
       }
   
  @@ -292,7 +296,10 @@
                   a.stock = rs.getInt(colStock);
                   a.orderedUnits = rs.getInt(colOrdered);
                   a.minimumStock = rs.getInt(colMin);
  +                
  +                rs.close();
               }
  +            stmt.close();
           }
           catch (Throwable t)
           {
  @@ -425,6 +432,7 @@
                   stmt.setInt(9, a.articleId);
                   stmt.execute();
               }
  +            stmt.close();
               conn.commit();
           }
           catch (Throwable t)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message