Bring transaction invalidation interceptor into Infinispan 2LC
Description
There has been some changes in Infinispan transactional invalidation code in order to provide a safer solution for older Hibernate versions WRT when keys are invalidated when using transactional invalidated entity caches. To be more precise, when using 2 phase commit transactions, keys are now invalidated on commit, see ISPN-5876 for more information.
However, this new logic conflicts with Radim's recent changes in 5.0 and master, which do not suffer from the problems in ISPN-5876 anyway.
So, after discussion with Radim, it was agreed that the best way to solve this incompatibility is by having a transactional invalidation interceptor within 2LC code which mimics pre-ISPN-5876 logic.
There has been some changes in Infinispan transactional invalidation code in order to provide a safer solution for older Hibernate versions WRT when keys are invalidated when using transactional invalidated entity caches. To be more precise, when using 2 phase commit transactions, keys are now invalidated on commit, see ISPN-5876 for more information.
However, this new logic conflicts with Radim's recent changes in 5.0 and master, which do not suffer from the problems in ISPN-5876 anyway.
So, after discussion with Radim, it was agreed that the best way to solve this incompatibility is by having a transactional invalidation interceptor within 2LC code which mimics pre-ISPN-5876 logic.