摘要: (1)spring模式:尽管spring已经配置了事务,但以下代码中还是要设置事务,不然batch不会起作用;另外这里虽然设了一下事务处理,但对全局事务并不会造成影响;注:不启用事务将建立多次连接,这表示batch没起作用,建立事务后一次连接就搞定了.Java代码publicvoidbatchAddExamlog(ListexamlogList)throwsSQLException{SqlMapClientsmc=this.getSqlMapClient();try{smc.startTransaction();smc.startBatch();for(Iteratoriter=examlog 阅读全文
posted @ 2014-03-01 17:47 淡然_ 阅读(312) 评论(0) 推荐(0)