Hi,
I have 2 servlets which use hibernate to preserve data.
One is a Reader, the other is a Writer to the same database.
My question is how does the Reader knows that data in the database has been updated by the Writer and Reader needs to refresh its object built using hibernate?
Assume the Writer save the object like this:
HibernateUtil.getSession().saveOrUpdate(user);
And how does the Reader knows it needs to :
user = (User) session.load(User.class, userId);
Writer and Reader can run in different JVM.
Thank you.
Hibernate version: N/A
Mapping documents: N/A
Code between sessionFactory.openSession() and session.close(): N/A
Full stack trace of any exception that occurs: N/A
Name and version of the database you are using: N/A
The generated SQL (show_sql=true): N/A
Debug level Hibernate log excerpt: N/A
|