JPA + Hibernate + autocommit

后端 未结 1 1411
渐次进展
渐次进展 2021-01-12 07:58

Does anybody know why I get this warning when I turn off the auto-commit in JPA configuration file?

Using this setting :



        
相关标签:
1条回答
  • 2021-01-12 08:02

    From section 13.3.4 of the EJB 3.0 specification:

    The enterprise bean’s business methods, message listener methods, business method interceptor methods,life cycle call back interceptor methods, or timeout callback method must not use any resource-manager specific transaction management methods that would interfere with the container’s demarcation of transaction boundaries. For example, the enterprise bean methods must not use the following methods of the java.sql.Connection interface:commit, setAutoCommit, and rollback; or the following methods of the javax.jms.Session interface:commit and rollback.

    0 讨论(0)
提交回复
热议问题