-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Caches
PostPosted: Mon Sep 20, 2010 3:39 am 
Newbie

Joined: Mon Sep 20, 2010 2:58 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.