-->
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: TreeCache region configuration
PostPosted: Wed Sep 13, 2006 6:45 pm 
Newbie

Joined: Tue Sep 21, 2004 12:39 pm
Posts: 18
I'm moving from the EHCache provider to the JBoss TreeCache provider as I'm now running in a clustered environment. With EHCache a class would be configured like the following sample:


Code:
    <cache name="com.acme.content.Content"
        maxElementsInMemory="200"
        eternal="false"
        timeToIdleSeconds="86400"
        timeToLiveSeconds="0"
        overflowToDisk="false"
        />
    <cache name="com.acme.content.Content.restrictToRoles"
        maxElementsInMemory="500"
        eternal="false"
        timeToIdleSeconds="86400"
        timeToLiveSeconds="0"
        overflowToDisk="false"
        />


This would cache 'Content' as well as the assocation 'restrictToRoles'.

Using the examples from HIA the region configuration for 'Content' should be something like:

Code:
<region name="/com/acme/content/Content">
   <attribute name="maxNodes">200</attribute>
   <attribute name="timeToLiveSeconds">86400</attribute>
   <attribute name="maxAgeSeconds">0</attribute>
</region>


How though should the assication 'restrictToRoles' be configured? Is the following correct?

Code:
<region name="/com/walkaway/content/Content.restrictToRoles">
   <attribute name="maxNodes">500</attribute>
   <attribute name="timeToLiveSeconds">86400</attribute>
   <attribute name="maxAgeSeconds">0</attribute>
</region>

_________________
David Launen


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 7:21 pm 
Newbie

Joined: Tue Sep 21, 2004 12:39 pm
Posts: 18
It appears that the following region configuration might be correct:

Code:
<region name="/com/acme/content/Content/restrictToRoles">
   <attribute name="maxNodes">500</attribute>
   <attribute name="timeToLiveSeconds">86400</attribute>
   <attribute name="maxAgeSeconds">0</attribute>
</region>
<region name="/com/acme/content/Content">
   <attribute name="maxNodes">500</attribute>
   <attribute name="timeToLiveSeconds">86400</attribute>
   <attribute name="maxAgeSeconds">0</attribute>
</region>



This only works if '.../Content/restrictToRoles' is defined before '.../Content'

Could someone verify that this is the correct method of configuring a cached association?

Thanks.

_________________
David Launen


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.