Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们已经知道JdbcContext类从hibernate 4中消失了。现在,我想知道替换JdbcContext的registerSynchronizationIfPossible()方法的逻辑的机制是什么,考虑到许多其他相关接口(TransactionFactory等)也发生了变化。 .
JdbcContext
TransactionFactory
使用org.hibernate.engine.transaction.spi.TransactionCoordinator#pulse. 那是直接负责与过去相同的事情的JdbcContext#registerSynchronizationIfPossible方法
org.hibernate.engine.transaction.spi.TransactionCoordinator#pulse
JdbcContext#registerSynchronizationIfPossible