-
1. Re: Infinispan provider for Hibernate ORM cache in WildFly 18
lafr Nov 4, 2019 2:37 PM (in response to heruan)It should not be necessary to set property hibernate.cache.region.factory_class, this is set by the WildFly system as far as I know.
I'm using second level caching in my application without this property.
Can you show us your complete persistence.xml file?
Did you use caching with older WildFly versions successfully or just starting to use WildFly now?
Which configuration you're using? standalone.xml or standalone-full.xml? Any modifications done here?
-
2. Re: Infinispan provider for Hibernate ORM cache in WildFly 18
heruan Nov 5, 2019 3:08 AM (in response to lafr)Thanks Frank for the interest! I didn't use any caching before. The app is a Spring application, so I define Hibernate properties in application.yml, which is:
spring:
datasource:
jndi-name: java:/datasource/service/default
jpa:
show-sql: true
properties:
hibernate:
cache:
use_query_cache: true
use_second_level_cache: true
I'm in domain mode with a full-ha profile, the only modification is the datasource:
<datasource jndi-name="java:/datasource/service/default" pool-name="service_default">
<connection-url>jdbc:postgresql://xx.xx.xx:xx/xx</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<connection-property name="url">
jdbc:postgresql://xx.xx.xx:xx/xx
</connection-property>
<driver>postgresql</driver>
<security>
<user-name>xxxx</user-name>
<password>xxxx</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/>
<background-validation>true</background-validation>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
</validation>
</datasource>
-
3. Re: Infinispan provider for Hibernate ORM cache in WildFly 18
lafr Nov 5, 2019 6:59 AM (in response to heruan)Using Spring and not JavaEE is probably the fact which makes the difference.
Searching the forum for "wildfly spring hibernate cache infinispan" I found two similar problems with solution from the past which could help you:
Wildfly 10 / Spring / Hibernate / Infinispan configuration question
Especially the first one might be useful.
-
4. Re: Infinispan provider for Hibernate ORM cache in WildFly 18
heruan Nov 5, 2019 8:06 AM (in response to lafr)Thanks, but I started from that and the effect of setting the region factory class is what I described in my post