I've built apps in the past where in order to test things, I've had to manually issue SQL to the database and then try to read these changes via Hibernate. The problem is that an error is always thrown when I try to do this. I have a theory that EhCache is the culprit, but I'm not sure. Is there a setting I can enable to prevent things from getting messed up when being accessed from multiple applications?
Asked
Active
Viewed 34 times
0
-
ehcache is your second level cache right? If you alter the database without telling ehcache you will always get the wrong value until the cache expires. – Heathen Aug 17 '11 at 11:07
1 Answers
1
Disable your second level cache when testing
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

Heathen
- 623
- 5
- 13
-
What about when I'm in production and I need other applications to be able to update the database? – Naftuli Kay Aug 17 '11 at 17:43