Search in sources :

Example 1 with JndiInfinispanRegionFactory

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());
}
Also used : Item(org.hibernate.test.cache.infinispan.functional.entities.Item) JndiInfinispanRegionFactory(org.hibernate.cache.infinispan.JndiInfinispanRegionFactory) Cache(org.infinispan.Cache) Test(org.junit.Test)

Aggregations

JndiInfinispanRegionFactory (org.hibernate.cache.infinispan.JndiInfinispanRegionFactory)1 Item (org.hibernate.test.cache.infinispan.functional.entities.Item)1 Cache (org.infinispan.Cache)1 Test (org.junit.Test)1