problem clustering with ehcache and glassfish

View: New views
1 Messages — Rating Filter:   Alert me  

problem clustering with ehcache and glassfish

by tenglish :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We are using glassfish and ehcache, and can't get the ehcache nodes to replicate to each other. We've tried clustered and non-clustered glassfish configurations, and have used the example ehcache.xml settings, but cannot get the caches to synchronize. Our current configurartion is taken from the ehcache unit-test docs:

<cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
            properties="peerDiscovery=automatic,
                        multicastGroupAddress=230.0.0.1,
                        multicastGroupPort=4446"/>

<cacheManagerPeerListenerFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
            properties= "port=40002"/>

<defaultCache
            maxElementsInMemory="10"
            eternal="false"
            timeToIdleSeconds="100"
            timeToLiveSeconds="100"
            overflowToDisk="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=true,
                                               replicatePuts=true,
                                               replicateUpdates=true,
                                               replicateUpdatesViaCopy=true,
                                               replicateRemovals=true "/>
        <bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />
    </defaultCache>

    <cache name="com.popcap.soa.datamodel.Score"
           maxElementsInMemory="10"
           eternal="false"
           timeToIdleSeconds="100"
           timeToLiveSeconds="100"
           overflowToDisk="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=true,
                                    replicatePuts=true,
                                    replicateUpdates=true,
                                    replicateUpdatesViaCopy=false,
                                    replicateRemovals=true,
                                    asynchronousReplicationIntervalMillis=10"/>
        <bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
                                   properties="bootstrapAsynchronously=false,
                                               maximumChunkSizeBytes=5000000"/>
    </cache>

Using this configuration we can populate the cache on one node, but it does not synchronize. Any help would be appreciated.

Thanks