Hello Sir,
I have configured 2nd level Caching using Hibernate Annotations in my persistent entity clases.
BUT My Requirement was :
My database tables are only ready only tables jsut for first time reference purpose when the user logs in for the first time. I don't want it to be changed by any of the users while they update the state of their entity clases and persist them through the provided user interface(UI) screen...
In Other words, data will be fetched by hitting the database and stored in entity classes only the 1st time when user logs in.
After that, what ever changes the user is doing, to that data, it should be only updated in the user cache (my second level cache).. but not in the database table......
Is it possible to achieve this through Hibernate or any other ORM tools to only update cache and not Database tables??????
Is it possible to use any Cache Provider API's (like EhCache) to acheive the above desired result.??????
Is it possible to implement the methods of EntityManagerFactory and change them and make them update only Cache(and skip database table updation) or Are there any configurations that can be done in the Hibernate.cfg/persistent.xml file to acheive the above desired behavior for caching .....!
KINDLY HELP.!! THANKS.!!!
|