HHH-6297 remove legacy cache api

This commit is contained in:
Strong Liu 2011-06-09 12:14:52 +08:00
parent 11f83b0373
commit 9fde4c0da4
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,6 @@
package org.hibernate.envers.test.integration.cache; package org.hibernate.envers.test.integration.cache;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.cache.internal.EhCacheRegionFactory;
import org.hibernate.cfg.Environment; import org.hibernate.cfg.Environment;
import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.envers.RevisionType; import org.hibernate.envers.RevisionType;
@ -10,6 +9,8 @@ import org.hibernate.envers.test.AbstractSessionTest;
import org.hibernate.envers.test.Priority; import org.hibernate.envers.test.Priority;
import org.hibernate.envers.test.entities.StrTestEntity; import org.hibernate.envers.test.entities.StrTestEntity;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.cache.CachingRegionFactory;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
@ -26,8 +27,9 @@ public class HibernateSecLvlQueryCache extends AbstractSessionTest {
config.addAnnotatedClass(StrTestEntity.class); config.addAnnotatedClass(StrTestEntity.class);
config.setProperty(Environment.USE_SECOND_LEVEL_CACHE, "true"); config.setProperty(Environment.USE_SECOND_LEVEL_CACHE, "true");
config.setProperty(Environment.USE_QUERY_CACHE, "true"); config.setProperty(Environment.USE_QUERY_CACHE, "true");
config.setProperty(Environment.CACHE_REGION_FACTORY, EhCacheRegionFactory.class.getName()); //i don't see there is any specific reason that we need ehcache, so change it to the testing cache
config.setProperty(Environment.CACHE_PROVIDER_CONFIG, "ehcache-test.xml"); config.setProperty(Environment.CACHE_REGION_FACTORY, CachingRegionFactory.class.getName());
// config.setProperty(Environment.CACHE_PROVIDER_CONFIG, "ehcache-test.xml");
} }
@Test @Test