-->
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: Where is the code for first cache level in Hibernate
PostPosted: Thu Jun 24, 2010 10:25 pm 
Newbie

Joined: Thu Jun 24, 2010 7:07 am
Posts: 3
Hello,

I read about this level of caching in Hibernate. It's said that whenever I pass an object to save(), update() or saveOrUpdate(), that object will be added to session cache. But when investigating the SessionImpl class of Hibernate, I followed to this chain:

DefaultSaveOrUpdateEventListener : performSaveOrUpdate => entityIsTransient => saveWithGeneratedOrRequestedId

AbstractSaveEventListener : saveWithGeneratedId => performSave => performSaveOrReplicate

EntityIdentityInsertAction : execute

But I don't see any code which responsibility is to put that object to a session cache. Can anyone tell me that?

Thanks,
HTS


Top
 Profile  
 
 Post subject: Re: Where is the code for first cache level in Hibernate
PostPosted: Fri Jun 25, 2010 9:43 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
the session itself does keep references, that's what is also called the "first level cache", and that's why it can't be disabled.

_________________
Sanne
http://in.relation.to/


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.