I missed adding the WildFly clustering configuration for the Hibernate immutable-entity cache. I opened WFLY-5923 [1] for adding the cache but am unsure of whether org.hibernate.annotations.Immutable means that the application handles clearing the 2lc of stale immutable entities or if that should happen automagically when immutable entities are removed from the database.
In a cluster, I expect that the performance of caching immutable-entities, would be faster if we assume they will not be invalidated from the 2lc (e.g. let applications clear them from the cache). Since we are using Infinispan for the 2lc in WildFly, I would like to use an Infinispan simple-cache for immutable-entities, which does no invalidation. However, just because I would like to do this, doesn't make it right. :-) Which is why I'm asking, what the design intention is, so I can configure the WildFly clustering configuration (for immutable entities), to align with the intent. From Immutable javadoc: " Mark an Entity or a Collection as immutable. No annotation means the element is mutable. An immutable entity may not be updated by the application. Updates to an immutable entity will be ignored, but no exception is thrown. ... " Scott [1] https://issues.jboss.org/browse/WFLY-5923 _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev