-->
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: org.hibernate .SessionFactory.evict(... )
PostPosted: Mon Nov 28, 2005 9:02 am 
Newbie

Joined: Fri Jun 10, 2005 11:25 am
Posts: 18
org.hibernate .SessionFactory.evict(Class persistentClass, Serializable id):
Is this method removes from the 2L cache only the object identified by parameters or the whole object tree associated with it?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 9:12 am 
Newbie

Joined: Tue Nov 15, 2005 2:16 pm
Posts: 10
Vlad,

That method removes from the 2L cache only the object identified by the id parameter.

If that object references others, the gc wil take them (including the evicted object). Any way you don't have to worry, if you can reference any of those objects (usually) you could still use them. If you cant (usually) the gc will take care of them.

Emilio


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 4:11 am 
Newbie

Joined: Fri Jun 10, 2005 11:25 am
Posts: 18
Sorry, I did not get it.
In my previous post I mean the "whole object tree" consisting of cached objects ("with cache usage" enabled).
I probably, should have given more detailed description in my previous posting.
I have an object cached by L2 cache. This object references other objects.
All the referenced objects are cache enabled ("cache usage = "...etc)
At a certain point I would like to clean the cache from the object and other objects it references.
How gc can remove them from L2 cache?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 9:38 am 
Newbie

Joined: Tue Nov 15, 2005 2:16 pm
Posts: 10
Vlad,

Gc does not remove an object from cache, the cahce itself disposes it, only then the gc takes care of it.

The cache dispose policy and times can be configured by you.

But if you want a whole set of objects to be removed from the cache I think you should do it by hand or wait for them to expire.

Emilio


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.