trans.commit();
} catch (Exception e) {
try {
trans.rollback();// 回滚事务
} catch (SQLException e1) {
throw new DAOException("roll back exception ", e);
}
String info = StringUtil.getExceptionString(e);
LogFactory.getORMLogger("info").write(info);
throw new DAOException("transaction execute exception ", e);
} finally {
try {
trans.close();
} catch (SQLException e) {
throw new DAOException("transaction close exception ", e);
}
}
}