2 Replies Latest reply on Jan 17, 2007 11:10 AM by manik

    Simple question: Clustering with FileCacheLoader

    cypherhat

      I am using JBossCache in a WebSphere environment. I had been using a FileCacheLoader in LOCAL mode, although I hadn't set the CacheMode explicitly. So far, so good.

      Now, I want to enable clustering. I still want to use a FileExtendedCacheLoader; but, I want to replicate data across two WebSphere instances (in the same WS cluster.) I searched the documentation for the appropriate configuration, and, I am unclear how much I have to configure.

      I would expect that I'd have to add some configuration that allows each TreeCache to discover the other nodes in it's cluster. Thus, I see the ClusterConfig stanza in some example configurations.

      Is it enough just to set the cache mode to REPL_SYNC (I want synchronous replication)?

      Actually, a better way to ask this question is:

      Here is my (very minimal) configuration. What do I have to add to enable clustering?

      <?xml version="1.0" encoding="UTF-8"?>
      <config>
       <passivation>false</passivation>
       <preload>/nothing</preload>
       <cacheloader>
       <class>org.jboss.cache.loader.FileExtendedCacheLoader</class>
       <properties>location=/trp/GDU/cache</properties>
       <async>false</async>
       <shared>true</shared>
       <fetchPersistentState>false</fetchPersistentState>
       <purgeOnStartup>false</purgeOnStartup>
       </cacheloader>
      </config>


        • 1. Re: Simple question: Clustering with FileCacheLoader
          cypherhat

          I made some mistakes in the above post, and I apologize - I am new to JBossCache.

          I programmatically set the cache mode to "local". Also, multicast won't work in our environment (the server instances reside on separate subnets.)

          • 2. Re: Simple question: Clustering with FileCacheLoader
            manik

            Use a TCP configuration for JGroups if you can't use mcast (see www.jgroups.org for docs on how to do this)

            Set your cache mode to REPL_SYNC (better via the config than programmatically - gives you more flexibility)


            You don't need to tweak your cache loader config for clustering unless both nodes write to the same file store.