事务回滚和抛出的异常类型有关。还有如果你使用的是WebLogic,数据源要用TX开头的。

解决方案 »

  1.   

    我现在是Tx data sources 啊,请问具体什么异常才能产生回滚那?
      

  2.   

    System-level exceptions usually require the transaction to be rolled back. Often the container managing the bean does the rollback. Sometimes the client must roll back the transaction, though, especially if transactions are bean-managed. When an application-level exception occurs, the enterprise bean instance doesn't automatically roll back the client's transaction. 具体的你看看帮助。
      

  3.   

    runtimeException 会导致rollback,俺们常用的的就是ejbexception