Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider"/>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hello. I have an application that has multiple entity managers to different databases with the same schema. Thry all use the same bean classes and are setup to use ehcache. The second level cache is working fine.
The problem is if I ever change entitymanagers on the fly, the cache seems to be filled with objects from the previous em. I thought that 2nd level caching was at a factory level, but it looks like it is shared with all the em instances. Is there something I can set to get each em to use it's own 2nd level cache?
Thanks.