-->
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.  [ 1 post ] 
Author Message
 Post subject: My HQL requests don't put in cache the returned objects
PostPosted: Wed Sep 22, 2010 12:11 pm 
Newbie

Joined: Wed Sep 22, 2010 12:01 pm
Posts: 7
hi,

I have a problem the second level caches :
- when I make my HQL requests the returned objects are put in the second level cache
- but if I clear all the caches :
Code:
Map<String, CollectionMetadata> roleMap = factory.getAllCollectionMetadata();
for (String roleName : roleMap.keySet()) {
      factory.getCache().evictCollectionRegion(roleName);
}

Map<String, ClassMetadata> entityMap = factory.getAllClassMetadata();
for (String entityName : entityMap.keySet()) {
      factory.getCache().evictEntityRegion(entityName);
}

factory.getCache().evictDefaultQueryRegion();
factory.getCache().evictQueryRegion(UpdateTimestampsCache.REGION_NAME);

factory.getCurrentSession().clear();


then HQL requests no longer puts the returned objects in cache...

thanks for your help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.