-->
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.  [ 3 posts ] 
Author Message
 Post subject: Clearing L2 Cache using hibernate
PostPosted: Thu Apr 12, 2007 10:12 pm 
Newbie

Joined: Sat Jan 27, 2007 4:46 pm
Posts: 2
Location: BANGALORE INDIA
Hibernate version:
3.2


HI All,

I have configured in such a way that, i run a servlet which pulls the data from database and puts in to the L2 cache and i refer this cache hereafter. Problem is when ever updation is done on the datbase, the only way my L2 cache gets updated is by restarting my server and again running my servlet.
Is there a way to clear the L2 cache. if so is that entire L2 cache will be deleted or is there a way to clear only few object without restarting the server

if possible kindly let me know some examples
Thanks

_________________
Believe In Your Self,


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 10:59 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Have you read section 19 of the ref docs? It tells you when it's not appropriate to use the L2 cache.

Also, you should check your CacheMode. You may be expecting it to work as if it was NORMAL, but you may have configured it as GET.

As to your question: if you're reading exclusively from the L2 cache, you must have a reference to the Cache. Cache has a clear() method. I don't know of a way to clear a single region, though.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 2:13 pm 
Newbie

Joined: Wed Apr 11, 2007 5:54 pm
Posts: 4
Not sure if this is what you want, but SessionFactory has some evict methods that let you remove entities from the second-level cache.


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