hi everyone,.
we are developing a java application with hibernate as DAO. now as i understand, hibernate have some cache in which we load object from database to our front end, and vice versa when persisting objects. I want to disable this caches so that every query made in my session goes directly from my database to my application. I figured out this would be better this way since our database is accessed by multiple applications at the same time(e.g. application1 manages the entry of person information and application2 uses the person entries in application1 to associate a transaction with a person), each of the application is on a different computer and is connected to the database server via LAN, the problem with this is application2 cannot synchronize with the entries made by application1. i have tried committing the transaction every query (i am using getCurrentSession() to create a session object), to flush the session but this very impractical since i have to flush everytime changes in the database is made so that it would be synchronized. i want to get rid of the cache and run queries directly on the database.
in summary:
//this what usually happens with hibernate. please correct me if my observation is wrong front end ==> query ==> cache ==> database
//this is what i want to accomplish front end ==> query ==> database
Thank a lot
Hibernate Newbie
|