-->
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.  [ 4 posts ] 
Author Message
 Post subject: Session level caching
PostPosted: Wed Nov 05, 2003 6:03 pm 
Newbie

Joined: Tue Aug 26, 2003 9:52 am
Posts: 15
Hello,

For our application I'm coming to believe that Session level caching is not really essential. We've actually had to resort systematic session.clear() after rollbacking the underlying Transaction.

I'm wondering if anyone else has come across this ?

Is there a simple way to disable session level caching (without prodiving a Custom SessionFactory) ?

Thanks.

Alain.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2003 7:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The longer you keep you sessions alive the more likely you are going to use a session.clear(). In general, it is best to keep your sessions alive for short periods of time thus a rollback would, in many cases, represent the end hence the session gets thrown away. As far as the cache is concerned this is equivalent to clearing it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2003 10:46 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
Assuming the rollback is caused by a DB error - hasn't Gavin said not to to continue using a Session after an exception?

Or am I confused again?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 06, 2003 12:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You are correct. The issue is that the session cache is (possibly/likely) in an inconsistent state thus you cannot continue to use it and guarantee data integrity. If the session cache is cleared then this issue not longer applies.


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