Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Configure test env "offline" mode instead of remote cache

    0 answers - 3221 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi,
    We are using JCS remote cache server in a production environment. I'm
    sure many of you have remote cache servers too.
    Question- How do you configure a test/dev environment? such that test
    instances of JBoss/tomcat/standalone apps do not access your remote
    caching server used for production?
    I'd like to configure JCS to work "offline" when it's in a test
    environment - i.e. instead of accessing the remote cache server just
    store/retrieve stuff from local memory.
    Basically what I'm looking for is a way to configure a "dummy" auxiliary
    cache in my test environment.
    This is my ccf:
    #
    # Default settings, specifying a local in-memory cache of max size 0
    objects
    # to effectively prevent objects being stored in regions which are not
    configured explicitly.
    #
    # These settings will be inherited by any regions which do not provide
    their own settings
    # to override these settings, thus unconfigured regions will not store
    any objects.
    #
    jcs.default=
    #
    # Settings configuring an auxiliary cache located on a remote caching
    server.
    # (auxiliary as in addition to the built-in local memory cache)
    #
    #
    # Settings specifying a cache region of unlimited size on a remote cache
    server,
    # where objects stay in remote server memory permanently and are never
    evicted.
    #
    # Note that being a region on a remote cache server, the configuration
    file on the remote server will
    # actually take effect, but duplicating the same settings client-side is
    recommended. See JavaDoc
    # note on this in class
    #
    jcs.region.region1=remotecache
    jcs.region.region2=remotecache
    and so on, same as region1
    We construct the ccf file programmatically and give it to JCS as a
    properties object. The auxiliaries are configured from static ccf file
    snippets. The regions are configured dynamically based on approx 6
    static template ccf snippets (we just inset the new region name into the
    template). Normally there are perhaps 30 regions depending on the number
    of "cacheable objects" the host application uses. All of the regions
    point to the "remotecache" auxiliary since that's where their template
    ccf snippets point to.
    Is it possible to just change the configuration of the remotecache
    auxiliary to make it work offline? Since all regions effectively "point"
    to the remotecache auxiliary, it would be useful to be able to swap the
    configuration of that auxiliary with an offline dummy version of it,
    when it's running in a test environment, and then the configuration of
    everything else would remain the same.
    Is something like the following possible
    I don't see a class called LRUMemoryCacheFactory in the project. Is
    there anything like that?
    I guess I could just omit the IP address of the remote cache server from
    the cff when running in a test environment. Are there any implications
    to doing that? I'd like the test environment to remain as similar to the
    production environment as possible. Any pointers would be appreciated
    Niall

Re: Configure test env "offline" mode instead of remote cache


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Java"

EMSDN.COM