-->
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: Configuring a QueryCache region with JBossCache
PostPosted: Mon Feb 14, 2005 4:21 pm 
Newbie

Joined: Fri Feb 11, 2005 1:27 pm
Posts: 5
Hi,
I have been trying to configure a particular group of queries using a cache region as specified in the documentation. Our deployment is Hibernate 2.1.8, JBossCache 1.1.1 and Spring. All mappings are generated using xdoclet annotations in each persistent object. Hibernate DB configuration is set using a properties file injected into the Spring session factory bean at startup-time. The same props file is used to set the 2nd level cache using the hibernate.cache.provider_class attribute.
Inside the DAO layer there are a number of queries that I'd like to optimize. To do so, I was planning to use a named cache region with particular rules, especially to set an expiration time different than the rest of the cache regions (generated by default by Hibernate with every persistent object).
I am confused about where and how to configure a cache region. The most convenient place for us is to use the same properties file used for setting the DB connection data mentioned before. I have been trying to use this property file to configure my cache region like this:
...
hibernate.cache.area1.timeToLiveSeconds=3600
hibernate.cache.area1.timeToIdleSeconds=1200
and I have used the setCacheRegion("area1") to all the queries that I wanted to be managed by "area1" cache region but it didn't work.
All I want is to be able to configure this region using some externalized parameters, preferably in the same place as all my other hibernate properties live (a properties file).
If you have any idea how to achieve this, please share it here.

Thank you,
florin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 11:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
The individual regions need to be configured in the underlying cache config mechanism. For the TreeCache integration, this is the treecache.xml file.


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.