Custom Hibernate slot and second level cache with Wildfly 12
alessandromoscatelli Mar 13, 2018 6:41 AMI am migrating to Wildfly 12 (JavaEE8 Hurray!).
Everything is OK but I can't enable the second level cache with a custom Hibernate slot (maybe Wildfly 12 is not compatible with the recent Wildfly 11 Hibernate orm releases ?) :
Maven Repository: org.hibernate » hibernate-orm-modules
I am specifying the slot version in the persistance.xml as the guide says :
<property name="jboss.as.jpa.providerModule" value="org.hibernate:5.2.13.Final" />
If I do so, a Nullpointer exception occurs on deploy.
I fail to understand how to configure the slot version in the new hibernate cache configuration in standalone.xml, since the cache module changed from org.hibernate.infinispan to org.infinispan.hibernate-cache
<cache-container name="hibernate" default-cache="local-query" module="org.infinispan.hibernate-cache"> <transport lock-timeout="60000"/> <local-cache name="local-query"> <object-memory size="10000"/> <expiration max-idle="100000"/> </local-cache> <invalidation-cache name="entity"> <transaction mode="NON_XA"/> <object-memory size="10000"/> <expiration max-idle="100000"/> </invalidation-cache> <replicated-cache name="timestamps"/> </cache-container>
This was my Wildfly 11 Hibernate configuration in standalone.xml
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan:5.2.13.Final"> <transport lock-timeout="60000"/> <local-cache name="local-query"> <eviction strategy="LRU" max-entries="10000"/> <expiration max-idle="100000"/> </local-cache> <invalidation-cache name="entity"> <transaction mode="NON_XA"/> <eviction strategy="LRU" max-entries="10000"/> <expiration max-idle="100000"/> </invalidation-cache> <replicated-cache name="timestamps" mode="ASYNC"/> </cache-container>
Thank you for you answers.