Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
Clustered Cache using EhCache Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clustered Cache using EhCache

    Hi,

    We are having an application level Cluster in the production and also development Environment. We are using the EhCache for caching the Data and then the data can be utilized by both the Application Servers which are in the Clustered mode. But the Cache is not replicating in the other node even though the Session is getting replicated. For the EhCache the Configuration is given in this way :


    Code:
    <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="hostName=localhost, port=40001,
    
    socketTimeoutMillis=2000"/>      
    
     
    
     <cache name="droseCache1"
    
               maxElementsInMemory="10"
    
               eternal="false"    
    
               timeToIdleSeconds="1000"
    
               timeToLiveSeconds="1000"
    
               overflowToDisk="false">
    
            <cacheEventListenerFactory
    
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
    
                    properties="replicateAsynchronously=false, replicatePuts=false,
    
                                replicateUpdates=true, replicateUpdatesViaCopy=true,
    
                                replicateRemovals=false"/>
    
                 
    
       </cache>


    Here the Application Server that is used is weblogic 9.1V

    We have a scenario of retrieving a set of records from the database for a Query and store them in Cache and retrieve them partially by means of the Iterator using a ValueListHandler pattern. We are storing the handler object in Cache, but the Object is not getting replicated or not even stored at the Other Node..

    Is there any error in the Configuration or what is the correct way to ensure that our Cache gets replicated at both the nodes.



    The way we have tested is .during the run time scenario we are fetching the data , Let us say there are 100 records in the element of the Cache..

    Only 20 of them are retrieved and they are authorized. Now the node 1 is turned off.



    The original result is it Should display the next consecutive records from the cache..

    But it is going to the database again instead of cache and fetches the records related to the query Call. So the number of records is now 80 since already 20 got authorized.


    Regards,
    Chandu.
Working...
X