use of org.hibernate.cache.infinispan.JndiInfinispanRegionFactory in project hibernate-orm by hibernate.
the class JndiRegionFactoryTest method testRedeployment.
@Test
public void testRedeployment() throws Exception {
addEntityCheckCache(sessionFactory());
bindToJndi = false;
rebuildSessionFactory();
addEntityCheckCache(sessionFactory());
JndiInfinispanRegionFactory regionFactory = (JndiInfinispanRegionFactory) sessionFactory().getSettings().getRegionFactory();
Cache cache = regionFactory.getCacheManager().getCache(Item.class.getName());
assertEquals(ComponentStatus.RUNNING, cache.getStatus());
}
Aggregations