@JN@FI@3ASG6XN.png" style="background:url(http://www.jfinal.com/assets/ueditor/lang/zh-cn/images/localimage.png) no-repeat center center;border:1px solid #ddd"/>
求助下这么使用为啥Db.tx的事物是无效的呢,只要执行Db.update数据就进库了~
jfinal事物为啥这么用不生效呢,只要执行update数据就进库了,数据库用的是oracle
Db.tx(new IAtom() { @Override public boolean run() throws SQLException { try { for(SqlRunItem sqlRunItem:sqlRunItems){ SqlRunScript sqlRunScript = SqlConverUtil.build(sqlRunItem.getStr("sqlscript"), parMap); Db.use(sqlRunItem.getStr("datasource")).update(sqlRunScript.getSqlscript(), sqlRunScript.getPara()); } } catch (Exception e) { return false; } return true; } });
项目:JFinal