You should use WildFly's hibernate region factory, which integrates with the Infinispan subsystem.
hibernate.cache.region.factory_class = org.jboss.as.jpa.hibernate4.infinispan.InfinispanRegionFactory
You can omit the "hibernate.cache.infinispan.cachemanager" property, as it is not relevant to WildFly's region factory implementation.
Thank you for the reply. I think I tried this as well along the way. In this case, I'm not able to locate that class under WildFly modules.
When I try to use it directly, I get the class not found exception
Caused by: org.hibernate.HibernateException: could not instantiate RegionFactory [org.jboss.as.jpa.hibernate4.infinispan.InfinispanRegionFactory]
Is there any specific library I should be importing?
Thanks in advance.
What happens if you don't set hibernate.cache.region.factory_class? Is your application using JPA or the native Hibernate api? For JPA, org.jboss.as.jpa.hibernate4.infinispan.SharedInfinispanRegionFactory is used. During deployment, WildFly sets the factory_class automatically if hibernate.cache.use_second_level_cache is set to true.
1 of 1 people found this helpful
I think he's using the hibernate API. I would bet that the class visibility issue is due to bundling the hibernate jar in the deployment, rather than exporting the WildFly's hibernate module to the deployment. See: https://docs.jboss.org/author/display/WFLY8/JPA+Reference+Guide#JPAReferenceGuide-UsingtheInfinispansecondlevelcache
smarlow There's a mistake in the documentation - the "hibernate.cache.infinispan.cachemanager" property should be removed from the sample configuration since is not read by jipijapa's region factory implementation.
Hi Paul.. the issue seems to be fixed. I started to get passed this issue but started to face another one as below
Spring IllegalStateException: A JTA EntityManager cannot use getTransaction()
I'm currently researching on that issue. Migration seems to be painful