-->
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 Cache not pulling new records after a refresh
PostPosted: Tue Oct 10, 2006 1:16 pm 
Newbie

Joined: Tue Oct 10, 2006 1:02 pm
Posts: 1
Hibernate version 3.1, XML Mapping, jdk 1.5

My application is a read only data pull and the data is update elsewhere outside of Hibernate. However I need to have Hibernate pull the new record when it is added to the table.

I clear the session before the refresh and that will bring back updated records. But new records are not returned.

I'm sure the answer for my question is out there some where but I'm having trouble finding it. If you have an answer or know where I can find it I would be grateful.

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 10, 2006 6:03 pm 
Regular
Regular

Joined: Tue Sep 26, 2006 11:37 am
Posts: 115
Location: Sacramento, CA
You must be using second level caching and in that case you need to do sessionFactory.evict() to clear it. The session.evict() API just gets rid of first level caching, that one is discarded at the end of the session anyway.


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.