spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

EMFU#doGetTransactionalEntityManager to check for actual transaction

Open ettavolt opened this issue 2 years ago • 0 comments

… rather than just a synchronization. Otherwise, at least SharedEntityManagerCreator will create a 'lingering' EM inside NEVER/NOT_SUPPORTED propagation, which is closed only after exiting from inside that boundary.

I did look at some other usage of isSynchronizationActive, and I'm not sure if it is more proper to use isActualTransactionActive there. I suspect this might be true for a couple of places.

isActualTransactionActive and doGetTransactionalEntityManager seem to be around here since before the recorded history, so we can't say if isActualTransactionActive was added after or before doGetTransactionalEntityManager.

ettavolt avatar Nov 04 '22 13:11 ettavolt