Spring + Hibernate +JTA - HibernateTransactionManager or JTATransactionManager

主宰稳场 提交于 2019-12-01 09:34:17

If you want to delegate to the appserver, you have to use JTATransactionManager to my knowledge, HibernateTransactionManager is not a JTA transaction manager.

PlatformTransactionManager implementation for a single Hibernate SessionFactory. Binds a Hibernate Session from the specified factory to the thread, potentially allowing for one thread-bound Session per factory. SessionFactoryUtils and HibernateTemplate are aware of thread-bound Sessions and participate in such transactions automatically. Using either of those or going through SessionFactory.getCurrentSession() is required for Hibernate access code that needs to support this transaction handling mechanism.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!