Hello all,
We are trying to set up a 2-node replicated ehcaching strategy under
4.0.0 and are having some problems. We've pretty much copied the
replication code for ticketRegistry.xml from the documentation with the
exception being that we moved the ehcache-replicated.xml file from
classpath to a file in our /etc/cas/directory:
<bean id="ticketRegistry"
class="org.jasig.cas.ticket.registry.EhCacheTicketRegistry"
p:serviceTicketsCache-ref="serviceTicketsCache"
p:ticketGrantingTicketsCache-ref="ticketGrantingTicketsCache" />
<bean id="abstractTicketCache" abstract="true"
class="org.springframework.cache.ehcache.EhCacheFactoryBean"
p:cacheManager-ref="cacheManager"
p:diskExpiryThreadIntervalSeconds="0"
p:diskPersistent="false"
p:eternal="false"
p:maxElementsInMemory="10000"
p:maxElementsOnDisk="20000"
p:memoryStoreEvictionPolicy="LRU"
p:overflowToDisk="true"
p:bootstrapCacheLoader-ref="ticketCacheBootstrapCacheLoader" />
<!-- MUST use synchronous repl for service tickets for correct behavior. -->
<bean id="serviceTicketsCache"
class="org.springframework.cache.ehcache.EhCacheFactoryBean"
parent="abstractTicketCache"
p:cacheName="cas_st"
p:timeToIdle="0"
p:timeToLive="300"
p:cacheEventListeners-ref="ticketRMISynchronousCacheReplicator" />
<bean id="ticketGrantingTicketsCache"
class="org.springframework.cache.ehcache.EhCacheFactoryBean"
p:cacheName="cas_tgt"
p:timeToIdle="0"
p:timeToLive="7201"
p:cacheEventListeners-ref="ticketRMIAsynchronousCacheReplicator" />
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
p:configLocation="file:/etc/cas/ehcache-replicated.xml"
p:shared="false"
p:cacheManagerName="ticketRegistryCacheManager" />
<bean id="ticketRMISynchronousCacheReplicator"
class="net.sf.ehcache.distribution.RMISynchronousCacheReplicator"
c:replicatePuts="true"
c:replicatePutsViaCopy="true"
c:replicateUpdates="true"
c:replicateUpdatesViaCopy="true"
c:replicateRemovals="true" />
<bean id="ticketRMIAsynchronousCacheReplicator"
class="net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator"
parent="ticketRMISynchronousCacheReplicator"
c:replicationInterval="10000"
c:maximumBatchSize="100" />
<bean id="ticketCacheBootstrapCacheLoader"
class="net.sf.ehcache.distribution.RMIBootstrapCacheLoader"
c:asynchronous="true"
c:maximumChunkSize="5000000" />
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user