hibernate,spring jdbc共享事務管理

1:同時使用spring jdbc和hibernate,需要功用hibernate的事務管理器,並且用同一個
數據源,否則會出現如下錯誤:
Pre-bound JDBC Connection found - HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章