Radim Vansa Regarding SharedSessionContractImplementor, there is in fact a way to do that and I'd rather not change it. SharedSessionContractImplementor.getTransactionCoordinator().getLocalSynchronizations() which returns you a SynchronizationRegistry which is a registry of all the Synchronizations that Hibernate components have registered. But these are kept local to the Session. Hibernate also only ever registers one Synchronization with the JTA TransactionManager (although these "local Synchronizations" also work outside of JTA); it simply delegates the JTA synch calls to these local synchs. Beyond that, I am not following what you mean by "... and in hibernate-infinispan to register a new synchronizations with this one". Regarding #lockItem... generally that is used to lock the "cache entry" from access from other Sessions; we want that to happen before we call the database. JTA-based impls would generally just ignore #lockItem and #afterUpdate/#unlockItem. |