[jboss-user] [JBossCache] - Region based cachine (JBoss Cache + Hibernate)

narendrakg do-not-reply at jboss.com
Wed Feb 6 03:03:54 EST 2008


I am using JBoss cache as 2nd level cache in Hibernate.

But I am trying to use region based caching, so that cache regions of different tables refresh in different time intervals.

I have configured my settings as per below but cache is refreshing based on default region settings i.e. <region name="/_default_">

Am I missing something?

JBoss Cache configuration (region only)
<region name="/SYSTEM_PARAMETER">
  | 	<attribute name="maxNodes">50000</attribute>
  | 	<attribute name="timeToLiveSeconds">7200</attribute>
  | 	<attribute name="maxAgeSeconds">7200</attribute>
  | </region>

HIbernate configuration (hbm file)
<hibernate-mapping package="com.shkco.nwte.common.datamodel">
  | 	<class name="SystemParameter" table="SYSTEM_PARAMETER">
  | 		<cache usage="read-only"/>
  | 	..
  | 	</class>
  | </hibernate-mapping>

Java Code 
  | query..setCacheRegion("SYSTEM_PARAMETER");
  | where query if of type "org.hibernate.Query"

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126890#4126890

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126890

More information about the jboss-user mailing list