-->
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: Problems configuring ehcache
PostPosted: Tue Nov 21, 2006 12:29 pm 
Beginner
Beginner

Joined: Wed Apr 26, 2006 4:40 am
Posts: 24
Hibernate version:
3.2.0.cr4

We have two problems with our cache configuration.

The first is, that I declared a collection in package.MainClass as non mutable:
Code:
<bag name="otherClasses" table = "a_table" lazy="true" order-by="pos" mutable="false" >
   <key column="at_id"/>
   <many-to-many class="package.OtherClass" column = "oc_id" not-found="ignore"  />
</bag>


And configured cache like this:

Code:
<collection-cache collection="package.MainClass.otherClasses" usage="read-only" />


and hibernate says:
WARN : read-only cache configured for mutable class: package.MainClass.otherClasses.

MainClass and OtherClass are also non mutable


The second is, that when the cache has still stored the query but the objects where allready removed from the cache, hibernate fetches the objects by using a seperate select for each object which totally destroys performance. In fact, some pages load faster without any caching at all than when queries are stored but the objects are not. Is there a way to tell hibernate to repeat the entire query if one of the objects in the query result isn't found in the cache anymore?


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.