-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate 1st level cache stale data
PostPosted: Wed Aug 25, 2010 5:09 pm 
Newbie

Joined: Fri Dec 19, 2008 7:14 pm
Posts: 2
I am having a problem with my application displaying stale data which I believe is due to the 1st level Hibernate cache. I am using EJB3 with Hibernate 3.2.6. My app is also using SEAM extended persistence context by the way (not sure if that's getting in the way or not).

I have 2 browsers open with different sessions that display the same entity... Let's say it's some kind of an calendar event. Browser 1 edits the entity. I see the edits on browser 1 and the changes are committed to the database. Browser 2 has already loaded that calendar event entity in the session so it continues to pull it from the hibernate cache... even when I run a new query (this includes JPQL queries and load operations). If I refresh that entity explicitly or clear the persistence context I see the new data. I don't really feel I should have to do that though. Seems messy and problematic.

Is there a way to configure Hibernate to not pull the entities from the 1st level cache when running a query?


Top
 Profile  
 
 Post subject: Re: Hibernate 1st level cache stale data
PostPosted: Mon Aug 30, 2010 8:30 am 
Newbie

Joined: Fri Dec 19, 2008 7:14 pm
Posts: 2
No one?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.