-->
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.  [ 3 posts ] 
Author Message
 Post subject: Disable Session Level Cache
PostPosted: Mon Feb 09, 2004 11:27 am 
Regular
Regular

Joined: Sun Jan 18, 2004 9:43 am
Posts: 50
Hi all

How can I disable the Session level cache? I used hib. to make the same query in the same session continuously and while it is retrieving the data, I use another program to update the record, however, hib still giving me the old data. I think it is because the Session Level cache caused the problem and in my system there are many different programs accessing and updating the database therefore, I have to make sure the session-level cache is not enable. I am using hib with the ehcache.jar.


Cheer

_________________
Edmond Hung
Credit Card DNA Security System (Holdings) Ltd.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 11:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can not disable the session level cache. Make proper use of transactions and transaction isolation levels.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 11:59 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Have a look at this one http://www.hibernate.org/Documentation/SessionAndTransactionScope
and at optimistic locking (using version).

Your session scope is probably too long. The session cache is mandatory to solve 2 phase validation of objects.

_________________
Emmanuel


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

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.