Esempio n. 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;
 }
Esempio n. 2
0
 protected void tearDown() throws Exception {
   super.tearDown();
   session.getConnection().close();
 }