TransactionHelper.registerSynchronization is called by callers expecting to register a handler to do cleanup at transaction end. If there is no transaction active, then it will never be called and the caller's expectation of cleanup will be violated.
So if there is no transaction active (or marked rollback) at the time when TransactionHelper.registerSynchronization is called, we should throw an exception.
- depends on
-
NXP-19361 Don't allow use of CoreSession outside a transaction
- Resolved