While migrating from EAP 6.4 to EAP 7.1.3 a potential memory leak was detected using infinispan EJB cache.
One of the main differences between EAP 6.4 and 7.1 concerns EJB passivation: file-passivation-store is replaced by passivation-store using infinispan.
We can see EJB are removed from memory once session times out. However the infinispan EJB cache keeps growing whereas it should be flat.
Disabling EJB passivation removed the memory retention, suggesting the leak is related to infinispan's EJB passivation feature.