1 Reply Latest reply on Apr 26, 2005 2:51 PM by Bela Ban

    SharedStoreCacheLoader Configuration and Usage

    null null Newbie

      Hi All,

      We have a JBossCache based impl that is clustered across multiple Web Services Containers.

      The requirement is to have CacheLoader used only when multiple CacheLoaders in a cluster access the same underlying store which is a Oracle Database

      SharedStoreCacheLoader seems to be the best bet as it does not do redundant reads and writes are done only from the coordinator. Though I found this in the 1.2.1 Java Docs, there is no writeup on how the properties are configured in the configuration file for example the DB related parameters - How do I initialize the cacheloader to be a SharedStoreCacheLoader?

      Can somebody help me on this? We currently are using the JDBCCacheLoader but it is too expensive as it keeps reading from the database

      There is also a situation that is as follows:

      We have a tree that goes as /XXXX/a/b/c (one region)
      and another that goes /XXXX/x/y/z (another region)

      I want to persist and read only the /XXXX/a/b/c and not the /XXXX/x/y/z region

      Today I do not see that it is possible using the JDBCCacheLoader. Is this correct? Also are regions supported for this kind of classloading? Primarily we want one section of the tree to be persisted while another region to not be persisted towards requirements and perf needs

      Any help at the earliest will be appreciated

      Thanks
      Swami

        • 1. Re: SharedStoreCacheLoader Configuration and Usage
          Bela Ban Master

           

          "swami_venkat" wrote:
          Hi All,

          We have a JBossCache based impl that is clustered across multiple Web Services Containers.

          The requirement is to have CacheLoader used only when multiple CacheLoaders in a cluster access the same underlying store which is a Oracle Database

          SharedStoreCacheLoader seems to be the best bet as it does not do redundant reads and writes are done only from the coordinator.


          This class has not been tested extensively. Why not use a regular CacheLoader, e.g. JDBCCacheLoader, and set CacheLoaderShared=true ? This way, reads are local, and writes are performed as write-through ops on the CacheLoader by the node that does the write.


          Can somebody help me on this? We currently are using the JDBCCacheLoader but it is too expensive as it keeps reading from the database

          What do you mean ? JDBCCacheLoader reads the first time, the keeps the value in the cache.


          There is also a situation that is as follows:

          We have a tree that goes as /XXXX/a/b/c (one region)
          and another that goes /XXXX/x/y/z (another region)

          I want to persist and read only the /XXXX/a/b/c and not the /XXXX/x/y/z region

          Today I do not see that it is possible using the JDBCCacheLoader. Is this correct? Also are regions supported for this kind of classloading? Primarily we want one section of the tree to be persisted while another region to not be persisted towards requirements and perf needs


          No, this is not supported, but on the roadmap (far away though): http://jira.jboss.com/jira/browse/JBCACHE-64.

          For now, use 2 instances of the cache