I think that it was my mistake to not make this 'immutable-entities' get its configuration from 'entities', when it's not declared explicitly. I believe that adding that cache configuration to WF configs is the easiest way to fix things; though, if users use their own configs, they won't be notified that something is missing in their standalone.xml - the same problem as with overridden infinispan configuration, though this shouldn't be that common and users should pay more attention if they do that.
AFAIK, there is no place but the default infinispan config where it is documented which caches need to be defined and what kind of config do they need. There is also no validation in the code. The defaults are just in the default config, not in the code, and therefore user can override all or nothing. Users can even think that all entities are stored in single cache (while each entity type has its own) . I don't think that serializing Infinispan configuration into properties is the best way. I plan to add some configuration sanity checks as part of HHH-10030, but I have not thought about any systematic approach, so I'd welcome any discussion. Radim On 08/18/2015 07:44 PM, Scott Marlow wrote: > On 08/18/2015 01:10 PM, Sanne Grinovero wrote: >> I think such options should not be an aspect of the Cache >> configuration but only a property of the Hibernate configuration. > The time to do that would of been about four years ago (now we have to > be configuration compatible on the WildFly side at least). Still, not > all applications include Hibernate configuration settings but they do > expect to use a second level cache. > > If we were to remove the Hibernate section from [1], where would that > configuration live and what code would deal with that? > >> Why should that be known to the Infinispan configuration? > In WildFly, that happens to be where we start/stop Infinispan caches, > which makes sense since that is where we also deal with clustering. > >> >> On 18 August 2015 at 14:29, Scott Marlow <smar...@redhat.com> wrote: >>> I didn't know about 'immutable-entity', should that be listed in [1] for >>> the WildFly standalone*.xml, so users can configure 'immutable-entity'? >>> >>> [2] describes the possible Infinispan subsystem settings for [1]. >>> >>> Scott >>> >>> [1] >>> https://github.com/wildfly/wildfly/blob/master/clustering/infinispan/extension/src/main/resources/subsystem-templates/infinispan.xml#L39 >>> >>> [2] >>> https://github.com/wildfly/wildfly/blob/master/clustering/infinispan/extension/src/main/resources/schema/jboss-as-infinispan_4_0.xsd >>> _______________________________________________ >>> hibernate-dev mailing list >>> hibernate-dev@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/hibernate-dev > _______________________________________________ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev -- Radim Vansa <rva...@redhat.com> JBoss Performance Team _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev