Hibernate嵌套事务nested有用过的吗??

weixin_38114194 2016-11-24 09:55:50
项目中需要使用到嵌套事务,有哪位大用org.springframework.orm.hibernate3.HibernateTransactionManager这个事务管理器做过嵌套事务(nested)的吗??  或者是有其他方式做过嵌套事务方面的业务吗? 求个DEMO参考一下。 下面是这个HibernateTransactionManager源码的注释: On JDBC 3.0, this transaction manager supports nested transactions via JDBC 3.0 Savepoints. ThesetNestedTransactionAllowed"nestedTransactionAllowed"} flag defaults to "false", though, as nested transactions will just apply to the JDBC Connection, not to the Hibernate Session and its cached objects. You can manually set the flag to "true" if you want to use nested transactions for JDBC access code which participates in Hibernate transactions (provided that your JDBC driver supports Savepoints). Note that Hibernate itself does not support nested transactions! Hence, do not expect Hibernate access code to semantically participate in a nested transaction.
...全文
19 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧