Is it possible to put some entity configuration in annotations, and some of it in the xml configuration file?
I need to implement a second level cache in an environment where there are many applications sharing data objects across different JVMs. In this situation, sometimes a particular application needs read-only caching, and a different application (running in a different VM) needs read-write caching of the same objects. Because of this, I need to be able to change the caching (read-only or read-write) depending on where the code is being used. This seems easiest if I have the caching configured in the xml instead of in annotations. I don't want to put everything in xml as that defeats one of the key benefits of hibernate over my previous ORM, and I already have a large code base with annotations in place.
Alternatively, how big is the performance hit of using read-write caching instead of read-only?
Thanks
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.x
Mapping documents:
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:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html