anonymous wrote : 
  | Without looking at the sources I thought that the responsible eviction 
handler would already prepend the deployment name as it is properly configured 
in the hibernate part: 

That's an interesting suggestion -- the Hibernate/JBC code could be smarter 
about checking the cache's eviction configuration and programatically creating 
regions that use the settings defined there.

Also possible improvement is to have an annotation on the bean to configure 
this, so it doesn't require using XML and understanding how the cache stores 
the data.

Note that the deployment name will only be used as the region prefix if you 
don't supply one. So, to make it less verbose you could do this:

 
  | Properties [
  |      .....
  | 
  |      hibernate.cache.region_prefix: myprefix
  | 
  |      .....
  | ]
  |           


  | <attribute name="EvictionPolicyConfig">
  |       <config>
  |         <attribute name="wakeUpIntervalSeconds">5</attribute>
  |         <!--  Cache wide default -->
  |         <region name="/_default_">
  |          <attribute name="maxNodes">5000</attribute>
  |          <attribute name="timeToLiveSeconds">0</attribute>
  |         <attribute name="maxAgeSeconds">60</attribute>
  |        </region>
  |         <region name="/myprefix/catalog/persistent">
  |          <attribute name="maxNodes">5000</attribute>
  |          <attribute name="timeToLiveSeconds">0</attribute>
  |          <attribute name="maxAgeSeconds">7200</attribute>
  |        </region>
  |       </config>
  |     </attribute>    
  | 

The reason for forcing use of a region prefix is it's needed to ensure proper 
classloader isolation between different deployments using the same cache.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089429
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to