We have two applications. One of them have been developed using Hibernate (v3.3.1.GA) using Mysql (connector v:5.1.7). The second application is a legacy application. The legacy application inserts rows into mySQL. The hibernate application queries the data to display. But what we find is that the query does NOT pick up the newly updated/inserted data by the legacy application.
I researched for past couple of days and did the following
1. Disabled the secondary cache
2. Disabled the query cache
3. Cleared the session cache by calling session.clear() before executing the query.
4. Removed caching at the transaction scope/ session (calling sessionFactory.opensession(), clearing the cache, querying and closing the session()).
Inspite of all this the newly inserted data by the legacy app, is not picked up. What are we missing here?
If we somehow force the hibernate application to do an update/insert in any tables in the DB, all the changes by the legacy application magically appear (like they are supposed to).
Any help is greatly appreciated.
Thanks!
|