Skip Headers
Oracle® Fusion Middleware High Availability Guide
11g Release 1 (11.1.1)

Part Number E10106-11
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

F Configuring the Distributed Java Object Cache

The Java Object Cache (JOC) should be configured among all the servers running Oracle Web Services Manager and among all the servers running Oracle WebCenter Spaces. This local cache is provided to increase the performance of Oracle WSM and Oracle WebCenter Spaces.

F.1 Configuring the Java Object Cache

The distributed Java Object Cache can be configured using the MW_HOME/oracle_common/bin/configure-joc.py script. This is a Python script which can be used to configure JOC in the managed servers. The script runs in WLST online mode and expects the Administration Server to be up and running.

When configuring JOC ports for Oracle products, Oracle recommends using ports in the 9988 to 9998 range.

Note:

After configuring the Java Object Cache using the wlst commands or configure-joc.py script, all affected managed servers should be restarted for the configurations to take effect.

Usage

This section demonstrates how to configure the distributed Java Object Cache for Oracle Web Services Manager or for Oracle WebCenter Spaces. For other applications such as ADF or WebCenter Custom Apps, substitute the relevant host, port and cluster names where appropriate.

  1. Connect to the Administration Server using the command-line Oracle WebLogic Scripting Tool (WLST).

    MW_HOME/oracle_common/common/bin/wlst.sh
    $ connect()
    

    Enter the Oracle WebLogic Administration user name and password when prompted.

  2. After connecting to the Administration Server using wlst, start the script using the execfile command, for example:

    wls:/mydomain/serverConfig>execfile('MW_HOME/oracle_common/bin/configure-joc.py')
    
  3. Configure JOC for all the managed servers for a given cluster.

    Enter 'y' when the script prompts whether you want to specify a cluster name, and also specify the cluster name and discover port, when prompted. This discovers all the managed servers for the given cluster and configures the JOC. The discover port is common for the entire JOC configuration across the cluster.

    For Oracle Web Services Manager:

    Do you want to specify a cluster name (y/n) <y>
    Enter Cluster Name : WSM_Cluster
    Enter Discover Port : 9991
    

    For Oracle WebCenter Spaces:

    Do you want to specify a cluster name (y/n) <y>
    Enter Cluster Name : Spaces_Cluster
    Enter Discover Port : 9988
    

    Here is a walkthrough for using configure-joc.py for HA environments:

    For Oracle Web Services Manager:

    execfile('MW_HOME/oracle_common/bin/configure-joc.py')
    .
    Enter Hostnames (eg host1,host2) : SOAHOST1, SOAHOST2
    .
    Do you want to specify a cluster name (y/n) <y>y
    .
    Enter Cluster Name : WSM_Cluster
    .
    Enter Discover Port : 9991
    .
    Enter Distribute Mode (true|false) <true> : true
    .
    Do you want to exclude any server(s) from JOC configuration (y/n) <n> n
    

    For Oracle WebCenter Spaces:

    execfile('MW_HOME/oracle_common/bin/configure-joc.py')
    .
    Enter Hostnames (eg host1,host2) : APPHOST1, APPHOST2
    .
    Do you want to specify a cluster name (y/n) <y>y
    .
    Enter Cluster Name : Spaces_Cluster
    .
    Enter Discover Port : 9988
    .
    Enter Distribute Mode (true|false) <true> : true
    .
    Do you want to exclude any server(s) from JOC configuration (y/n) <n> n
    

The script can also be used to perform the following JOC configurations:

You can also configure the Java Object Cache using the HA Power Tools tab in the Oracle WebLogic Administration Console, as described in Chapter 16, "Using HA Power Tools."

Verify the Java Object Cache configuration using the CacheWatcher utility. See Section F.2, "Running CacheWatcher."

F.2 Running CacheWatcher

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

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

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/
    cache.jar:MW_HOME/modules/oracle.odl_11.1.1/ojdl.jar
    oracle.ias.cache.CacheUtil watch -config=DOMAIN_HOME
    /config/fmwconfig/servers/WLS_Server_Server/javacache.xml"
    cache> lc
    VID:    2
    Size:   2
    Column: 0123456789
    CL:     JJ
    GRP0:   11
    ...
    Member Table:
    #1. J57161:145.87.9.15:86AAC2E:11B28D57BE4:-7FFE, 0
    #2. J35578:145.87.9.14:-9E92850:11B28D5F7E0:-7FFF, 1
    

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

    Note:

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