# Configuration Guide

# Setting Up a Coherence Management Gateway

This appendix describes how to configure a Coherence management gateway to enable the use of Coherence Smart Packs with WLOC. Topics include:

- Coherence Smart Pack Definitions
- Management Gateway Classes Installation Directory
- Configuring the Management Gateway

## Coherence Smart Pack Definitions

WLOC 10.3 includes Smart Pack definitions intended for use with Coherence 3.4. Smart Packs are predefined constraints that you can use to place requirements on some common measurements of service health and performance. To use the Coherence Smart Pack definitions, you must set up a Coherence management gateway that exposes a set of MBeans used by the Smart Packs. This gateway must be set up as a member of the Coherence cluster that is to be managed.

The Coherence Smart Pack definitions are as follows:

- Proxy-TotalConnectionCount-UpperBound
- Proxy-AverageConnectionCount-UpperBound
- Proxy-AverageOutgoingByteBacklog-UpperBound
- Proxy-AverageOutgoingMessageBacklog-UpperBound
- Cache-AverageUnitsPerNode-UpperBound
- Cache-TotalUnits-UpperBound
- Cache-TotalSize-UpperBound
- WKA-RunningWKACount-LowerBound

For information about defining constraints using Smart Packs, see “Define constraints using named constraints (Smart Pack)” in the WLOC Administration Console Online Help.

## Management Gateway Classes Installation Directory

When you install the WLOC Agent, the classes required for the gateway are installed in the following jar file:

    WLOC_HOME/coherence/3.4/coherence-wloc.jar

where `WLOC_HOME` is the product installation directory in which you installed WLOC.

This jar file includes MBean definitions and a main method used to launch the management gateway.

## Configuring the Management Gateway

You can configure the Coherence management gateway using the WLOC Administration Console, or by directly editing the `metadata-config.xml` file.

Note: | In the WLOC Administration Console, you specify these properties using the Process Group Template Properties page.

To configure the gateway:

1. Specify the value for the Main class (`main-class`) as follows:

    com.tangosol.coherence.wloc.CoherenceWLOCManagementGateway

This class includes the main method used to launch the management gateway.

2. Ensure that the classpath includes the Coherence classes and the classes required for the gateway. The gateway classes are provided in the `coherence-wloc.jar` file installed with WLOC. For example:

    C:/oracle/coherence3.4/lib/coherence.jar;C:/oracle/wloc_10.3/coherence/3.4/coherence-wloc.jar

Note: | In the `metadata-config.xml` file, the classpath follows the `-cp` argument.

3. In addition to the JVM arguments that are specific to any Coherence instance, you must specify the following arguments for the management gateway:

`-Dtangosol.coherence.management=all` (Initializes the Coherence MBeans.)

`-Dcom.sun.management.jmxremote.*` (Used to remotely expose the VM's platform MBeanServer which hosts the MBeans for the gateway.)

Listing B-1 provides an example of the metadata configuration for a Coherence management gateway instance.

Listing B-1 Sample Coherence Management Gateway Metadata Configuration

    <ns2:metadata-group>
        <ns2:name>CoherenceManagementGateway</ns2:name>
        <ns2:key>CoherenceManagementGateway</ns2:key>
        <ns2:instances>
            <ns2:jvm-instance>
                <ns2:name>ManagementGateway</ns2:name>
                <ns2:description>Coherence Management Gateway</ns2:description>
                <ns2:max-copies>1</ns2:max-copies>
                <ns2:variables/>
    <ns2:main-class>com.tangosol.coherence.wloc.CoherenceWLOCManagementGateway</ns2:main-class>
                <ns2:jvm-args>
                    <ns2:arg>-Dtangosol.coherence.localport=6001</ns2:arg>
                    <ns2:arg>-Dtangosol.coherence.wka=10.40.8.226</ns2:arg>
                    <ns2:arg>-Dtangosol.coherence.wka.port=8088</ns2:arg>
                    <ns2:arg>-Dtangosol.coherence.management=all</ns2:arg>
               <ns2:arg>-Dtangosol.coherence.distributed.localstorage=false</ns2:arg>
                    <ns2:arg>-Dcom.sun.management.jmxremote</ns2:arg>
                    <ns2:arg>-Dcom.sun.management.jmxremote.port=9000</ns2:arg>
                  <ns2:arg>-Dcom.sun.management.jmxremote.authenticate=false</ns2:arg>
                    <ns2:arg>-Dcom.sun.management.jmxremote.ssl=false</ns2:arg>
                     <ns2:arg>-cp</ns2:arg>
           <ns2:arg>C:/oracle/coherence3.4/lib/coherence.jar;C:/oracle/wloc_10.3/coherence/3.4/coherence-wloc.jar</ns2:arg>
                </ns2:jvm-args>
                <ns2:java-args>
                    <ns2:arg>-rmi</ns2:arg>
                </ns2:java-args>
                <ns2:native-lib-dir></ns2:native-lib-dir>
                <ns2:instance-dir>C:\LOC\plain_agent\proc</ns2:instance-dir>
                <ns2:native-jmx>true</ns2:native-jmx>
                <ns2:protocol>rmi</ns2:protocol>
                <ns2:host>10.40.8.226</ns2:host>
                <ns2:port>9000</ns2:port>
                <ns2:username></ns2:username>
        <ns2:jmx-service-url>service:jmx:rmi:///jndi/rmi://10.40.8.226:9000/jmxrmi</ns2:jmx-service-url>
                <ns2:ssh-enabled>false</ns2:ssh-enabled>
                <ns2:wait-for-ssh>false</ns2:wait-for-ssh>
                <ns2:priority>9</ns2:priority>
                <ns2:copies-at-create/>
                <ns2:copies-at-shutdown/>
            </ns2:jvm-instance>
        </ns2:instances>
    </ns2:metadata-group>