1617181920212223
this.conn = conn; try{ this.conn.setAutoCommit(false); } catch(SQLException e){ throw new TransactionException(e); } }
3738394041424344
conn.commit(); conn.close(); } } catch(SQLException e){ throw new TransactionException(e); } }
5051525354555657
conn.rollback(); conn.close(); } } catch(SQLException e){ throw new TransactionException(e); } }
132133134135136137138139
transaction.beginTransaction(); //增加事务级别 } } } catch(SQLException e){ throw new TransactionException(e); } }