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

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

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

F Configuring the Distributed Java Object Cache

Configure the Java Object Cache (JOC) among all the servers running Oracle Web Services Manager (WSM) and among all the servers running the Oracle WebCenter Portal's Spaces application. This procedure is optional, but increases the performance of Oracle WSM by keeping a local cache instead of having to search for a cache.

F.1 Configuring the Java Object Cache

Configure the distributed Java Object Cache using the MW_HOME/oracle_common/bin/configure-joc.py script, a Python script that you can use 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, restart all affected managed servers for the configurations to take effect.

This procedure describes how to configure the distributed Java Object Cache for Oracle Web Services Manager or for the Spaces application. For other applications, 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).

    ORACLE_HOME/common/bin/wlst.sh
    $ connect()
    

    Enter the Oracle WebLogic Administration user name and password.

  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 the Spaces application:

    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 the Spaces application:

    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; see 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. On APPHOST2, run 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
    

    Where:

    • For ORACLE_HOME, use the location of the Oracle WebCenter Portal installation. For example, MW_HOME/Oracle_WC1.

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

    • 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.

  2. At the CacheWatcher's prompt, type lc and then press Enter.

    A group view appears. It 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.