I'm running two separate EAR applications on WildFly 8.1 that each emded the same EJB module. The EJB module uses a persistence unit, for which I've enabled Hibernate's L2 cache and clustering (standalone-ha.xml).
If I run two instances of the first application on two WildFly instances, changes to an entity propagate correctly to the other instance (they invalidate correctly). However, they don't propagate to the second application (which thus has a different EAR name).
As it appears internally Hibernate / InfiniSpan uses the following key pattern to store cache managers for each entity: ear_name.ear/ejb_module.jar#fully_qualified_entity_class_name
Of course different applications that share the same ejb_module won't be affected by cache changes with this naming pattern for the key. Is there a way to change this pattern so that it only includes the ejb_module name followed by the FQN of the entity?