Local Infinispan level 2 cache for Hibernate contains stale data following transaction rollback in JBoss EAP

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7.2
  • Infinispan 9.3
  • Hibernate 5.3

Issue

  • Using Infinispan for level 2 cache for Hibernate.
  • When a transaction changes an entity and that transaction is, subsequently, rolled back, the changes are nonetheless put into the second level cache.
  • Subsequent cache reads will retrieve the stale/incorrect data.

Resolution

This issue1 is resolved in This content is not included.EAP 7.2 cumulative patch (CP) 1 and later releases. Production systems should use the latest available cumulative patch.

Root Cause

This is a known defect (Content from issues.jboss.org is not included.ISPN-10001).

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.