コード例 #1
0
 protected Boolean switchAutocommit(Boolean autocommit, String databaseType) {
   if (databaseType != null && !dbType.equalsIgnoreCase(databaseType)) return null;
   Boolean oldAutocommit = null;
   try {
     oldAutocommit = session.getConnection().getAutoCommit();
   } catch (SQLException e) {
   }
   if (autocommit != null) {
     try {
       session.getConnection().setAutoCommit(autocommit);
     } catch (SQLException e) {
     }
   }
   return oldAutocommit;
 }
コード例 #2
0
 protected void tearDown() throws Exception {
   super.tearDown();
   session.getConnection().close();
 }