-->
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: Loosing Elements in Second Level Cache
PostPosted: Fri Nov 07, 2008 6:38 am 
Newbie

Joined: Fri Nov 07, 2008 6:18 am
Posts: 3
Hi,

We are facing problem in Second Level cache. We have observed that whenever below query gets fire, all the elements in Second Level Cache of all the regions get evicted. Total size & elements become zero.

String sql = "delete from EmployeeContactRelationship ecr where ecr.teamID in(:teamIDList) and ecr.contactID in(:contactIDList)";

Query query = sessionFactory.getCurrentSession().createQuery( sql );

query.setParameterList("teamIDList", teamIDList);

query.setParameterList("contactIDList", contactIDList);

query.executeUpdate();


Please let me know if anybody has faced this kind of problem. What could be the other reasons of loosing elements in Second Level Cache.

Regards,
Sourabh


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2008 11:37 pm 
Expert
Expert

Joined: Mon Nov 26, 2007 2:29 pm
Posts: 443
That your sqlQuery deletes all the entities (and there is no reason for the cache to keep anything)?

_________________
Gonzalo Díaz


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.