Oracle Coherence operates in a clustered arrangement. Configure individual Oracle Coherence instances to locate each other by joining the same cluster. Then that cluster will automatically coordinate the distribution of cached data among its members. Configuring Oracle Coherence clusters is explained in detail in the documentation for that product (http://www.oracle.com/technetwork/middleware/coherence/documentation/index.html).

You can add members to the Oracle Coherence cluster as needed to improve your application performance. Add Oracle Coherence cluster members either as part of any additional Oracle ATG Web Commerce server that is configured to use external caching or as a standalone instance of Oracle Coherence.

When an Oracle ATG Web Commerce server starts up, it creates an Oracle Coherence cluster member in its own Java virtual machine. To do so, it invokes code in the coherence.jar file that is provided in the Oracle Coherence distribution. Standalone instances of Oracle Coherence interoperate with Oracle ATG Web Commerce servers and must have access to Java classes provided in the Oracle ATG Web Commerce distribution in the file <ATG11dir>/DAS/lib/atg-coherence-classes.jar.

Connecting Oracle ATG Web Commerce to an Oracle Coherence Cluster

To connect an Oracle ATG Web Commerce server to an Oracle Coherence cluster:

  1. Extract the files tangosol-coherence.xml and coherence-cache-config.xml from the top level of the coherence.jar file that is provided with the Oracle Coherence distribution.

    Place the files in a directory that is accessible by your Oracle ATG Web Commerce application server. Add the directory to the application server’s class path environment variable. Do not add the files themselves.

    Customize the XML files with the Oracle Coherence cluster connection information and your caching configuration. See the Oracle Coherence documentation for information about these customizations (http://www.oracle.com/technetwork/middleware/coherence/documentation/index.html).

    See the sample configuration file sample-coherence-cache-config.xml in <ATG11dir>/DAS/lib/classes.jar.

  2. Add [coherence-install-directory]/lib/coherence.jar to the CLASSPATH of your Oracle ATG Web Commerce application server. Add this file path after the directory that holds the Oracle Coherence configuration files from the previous step.

  3. Start the Oracle ATG Web Commerce application server and confirm that it has created an Oracle Coherence cluster member and that the cluster member joined the cluster that you expected. Example output from an application server log file is shown below. Note that messages from Oracle Coherence are labeled as errors by some application servers. These error messages may be routine and benign.

    2011-08-05 16:03:23.118/428.352 Oracle Coherence GE 3.6.0.4 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)':ipaddr=10.64.200.102;path=/dyn/admin/nucleus//atg/commerce/catalog/ProductCatalog-ver/;sessionid=6NkZT8MFrhvGw4QLCS8DQkw7yJp1lG8mfVCC2q90QmTKDJl19vpZ!762240401!1312574469587, member=n/a): Started cluster Name=ecCluster

    Group{Address=123.4.5.6, Port=36000, TTL=4}

    MasterMemberSet
    (
    ThisMember=Member(Id=1, Timestamp=2011-08-05 16:03:19.554, Address=12.34.567.890:48088, MachineId=57228, Location=machine:myserver,process:19539, Role=WeblogicServer)
    OldestMember=Member(Id=1, Timestamp=2011-08-05 16:03:19.554, Address=12.34.567.890:48088, MachineId=57228, Location=machine:myserver,process:19539, Role=WeblogicServer)
    ActualMemberSet=MemberSet(Size=1, BitSetCount=2
    Member(Id=1, Timestamp=2011-08-05 16:03:19.554, Address=12.34.567.890:48088, MachineId=57228, Location=machine:myserver,process:19539, Role=WeblogicServer)
    )
    RecycleMillis=1200000
    RecycleSet=MemberSet(Size=0, BitSetCount=0
    )
    )

    TcpRing{Connections=[]}
    IpMonitor{AddressListSize=0}

Adding an Oracle Coherence Cluster Member to Your Cluster

To add an Oracle Coherence cluster member to your cluster:

  1. Extract the files tangosol-coherence.xml and coherence-cache-config.xml from the top level of the coherence.jar file that is provided with the Oracle Coherence distribution.

    Place the files in a directory that is accessible from your Oracle Coherence installation directory.

    Customize the XML files with the Oracle Coherence cluster connection information and your caching configuration. See the Oracle Coherence documentation for information about these customizations (http://www.oracle.com/technetwork/middleware/coherence/documentation/index.html).

    Note: You can skip this step if you already have these files configured for the cluster member that is created by your Oracle ATG Web Commerce server.

    See the sample configuration file sample-coherence-cache-config.xml in <ATG11dir>/DAS/lib/classes.jar.

  2. Edit the file bin/cache-server.sh (or the corresponding *.cmd file) in your Oracle Coherence installation directory.

    Add the directory that holds the XML configuration files to the class path used by the script’s JAVAEXEC command. Do not add the files themselves. The class path is specified by the -cp argument. Make sure you add the directory before $COHERENCE_HOME/lib/coherence.jar.

    Add the directory that holds atg-coherence-classes.jar to the class path used by the script’s JAVAEXEC command. This file is available in your Oracle ATG Web Commerce installation directory at <ATG11dir>/DAS/lib/atg-coherence-classes.jar.

  3. Change to the root directory of your Oracle Coherence installation directory and invoke the file bin/cache-server.sh (or the corresponding *.cmd file).

  4. Confirm that the cluster member joined the cluster you expected. See the example terminal output that shows cluster information below.

    2011-08-05 14:10:08.886/4.737 Oracle Coherence GE 3.7.0.0 <Info> (thread=main, member=n/a): Started cluster Name=cluster
    :0x96AB

    Group{Address=123.4.5.6, Port=37000, TTL=4}

    MasterMemberSet
    (
    ThisMember=Member(Id=2, Timestamp=2011-08-05 14:10:07.679, Address=12.34.456.89:8090, MachineId=57105, Location=site:oh.my.domain.com,machine:myserver,process:14292, Role=CoherenceServer


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices