-->
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: First-Level cache question
PostPosted: Thu Nov 17, 2005 1:09 pm 
Newbie

Joined: Thu Nov 17, 2005 1:03 pm
Posts: 9
Location: Round Rock, TX
First question: Is there a way to disable specific entity(s) from being cached in the


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 6:48 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
1: No, there isn't. First-level cache is a transaction-scope cache, and is also used to guarantee uniqueness.

2: This usage pattern looks strange, you should open a session for the duration of one transaction (even if the whole transaction is just an update of a single field of an object) and then close it. Don't think of a session as a data gateway, think of it as a... well... a session :), a unit of work, a transaction - you open it, do the work (one or several related transactions), and then close it.


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.