F Running CacheWatcher to Verify Java Object Cache

You can use the CacheWatcher utility to verify your Java Object Cache distributed configuration. CacheWatcher itself becomes a member of the Cache cluster.

F.1 Running CacheWatcher

For this example, the managed servers in the cluster are WLS_Server1 and WLS_Server2:

  • WLS_Server1 is running on APPHOST1.

  • Start CacheWatcher on APPHOST2. WLS_Server2 should be down.

To run CacheWatcher:

  1. For ORACLE_HOME, use the location of the Oracle Web Center installation. For example, MW_HOME/Oracle_WC1.

  2. For DOMAIN_HOME, use the full path to the location of your domain, under MW_HOME/user_projects/domains.

  3. Server_Name refers to a managed server name. For example, WLS_Server2. Cachewatcher can use the same javacache.xml file that the Managed Server would use.

  4. On APPHOST2, execute the following:

    "java -classpath ORACLE_HOME/modules/oracle.javacache_
    11.1.1/cache.jar:ORACLE_HOME/modules/oracle.odl_11.1.1/ojdl.jar oracle.ias.cache.CacheUtil
    watch -config=DOMAIN_HOME/config/fmwconfig/servers/<Server_Name>/javacache.xml
  5. At the CacheWatcher's prompt, type lc and then press Enter.

    A group view appears.

    The group view indicates the number of cache members. The following is an example of a CacheWatcher run:

    java -classpath MW_HOME/modules/oracle.javacache_11.1.1/
    oracle.ias.cache.CacheUtil watch -config=DOMAIN_HOME
    cache> lc
    VID:    2
    Size:   2
    Column: 0123456789
    CL:     JJ
    GRP0:   11
    Member Table:
    #1. J57161:, 0
    #2. J35578:, 1

    After starting CacheWatcher on each host, find two members from the view.


    CacheWatcher itself is considered a distributed cache instance. To terminate the CacheWatcher shell, type exit and press Enter.