JUnit « Cache « JPA Q&A





1. Problems with JUnit and CacheProvider    forum.hibernate.org

I'm running Hibernate 2.1 and I'm having problems when I run tests using JUnit 3.8.1. I use the UI-test runner and I always get the following exception: net.sf.hibernate.HibernateException: could not instantiate CacheProvider: net.sf.ehcache.hibernate.Provider at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:115) at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1072) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:718) at no.nr.pl.server.DatabaseManager.getSession(DatabaseManager.java:76) (snip) If I uncheck the "Reload classes every run" box it works fine. I have also tried to modify the ...

2. Cache + JUnit    forum.hibernate.org

I have my Session open in junit setUp(), and close in tearDown() methods. My DAO layer takes the session as parameter and queries the db. query is set to cacheable. What if i handle the session issue in web app using servlet filter or something. How does cache is going to behave after the session is closed in multi user environment. ...

3. how to setup hibernate cache for junit    forum.hibernate.org