-->
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.  [ 5 posts ] 
Author Message
 Post subject: How to completely flush session?
PostPosted: Thu Feb 09, 2006 5:40 pm 
Newbie

Joined: Tue Feb 07, 2006 8:17 pm
Posts: 19
I have a very long conversation (session per application). Another process can change any part of my underlying database. How do I completely clear my cache so all objects are looked up again?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 09, 2006 5:46 pm 
Regular
Regular

Joined: Fri Sep 09, 2005 11:35 am
Posts: 101
use session.clear()


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 09, 2006 5:52 pm 
Newbie

Joined: Tue Feb 07, 2006 8:17 pm
Posts: 19
thanks alot. I'm now getting this though :

org.hibernate.HibernateException: reassociated object has dirty collection reference

Tom.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 09, 2006 5:54 pm 
Regular
Regular

Joined: Fri Sep 09, 2005 11:35 am
Posts: 101
you should look up the objects again yourself manually.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 09, 2006 6:06 pm 
Newbie

Joined: Tue Feb 07, 2006 8:17 pm
Posts: 19
Is there no way around this?

My application includes a replication process to a remote server. This is outside of hibernate and I don't really what has been updated.

My application is a swing app and it has lots of screens that can be switched without reloading.

So when my replication process runs I have to somehow mark all data objects in my application as 'dead' and reload them?

Tom.


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