sun.com | docs.sun.com | How To Buy | My Sun | Worldwide Sites |  |

| Previous Contents Index Next
Chapter 3 # Developing an External Java Manager For information about how to develop an external Java manager, see the following sections: Configuring an External Java Manager Using HTTP Connecting to the NMA Using Proxy MBeans ## Configuring an External Java Manager Using HTTP To use the HTTP protocol adaptor, edit the following NMA properties in the `nma.properties` file:
`com.sun.nhas.ma.connectors.http.enabled` | Set to `true` to enable the HTTP protocol adaptor
`com.sun.nhas.ma.connectors.http.port` | Set to the number of the port to be used for HTTP communication, for example, `8081`
These properties are by default `true` and `8081` respectively. ## Connecting to the NMA The procedure for connecting to the NMA, or reconnecting to the NMA in case of a change of mastership, depends on your addressing scheme. ### Using the Floating Address If you are using the floating address to connect to the NMA running on the master node, perform the following steps to manage a failover or switchover: Use the Java DMK heartbeat mechanism to detect the loss of contact with the master node. Reduce the timeouts on requests if necessary in order to guarantee the timely detection of a master node crashing abruptly. See "Heartbeat Mechanism" in the Java Dynamic Management Kit 5.0 Tutorial for information about how to use the Java DMK heartbeat mechanism. Reconnect to the NMA. The master floating address will be assigned to the new master node of the cluster. Reconnect to this NMA at this address. Wait until the cascading service has finished restarting and the master view has restarted. The cascading service queries all of the NMAs running in the cluster and makes this information available from the NMA on the master node. During this service restart period, not all MBeans cascading from other nodes will be available. If you attempt to manipulate an MBean on the master node that has not yet cascaded, an `InstanceNotFound` exception is thrown. Reregister all notification listeners. Notifications might be lost between when mastership changes and listeners are reregistered. Query the NMAs in the cluster to discover the current cluster state. ### Using a Physical Node Address If you are connecting to the NMA on each node using the node's IP address no connections will fail after failover or switchover. ## Using Proxy MBeans The statistics providers in the NMA are implemented as MBeans. A set of generated proxy classes for the statistics MBeans is supplied with the NMA. A remote manager can access these statistics through the exposed MBean interfaces. The Java DMK enables predefined proxy classes of these MBeans to be instantiated in an external Java manager, and the objects to be manipulated as if they were present locally. Communication with the proxied MBeans is handled automatically. For more information about using proxy MBeans, see "MBean Proxies" in the Java Dynamic Management Kit 5.0 Tutorial. To use the supplied proxy classes, the Java DMK Remote Manager's class path must contain the path to `proxies_42.jar` or `proxies_50.jar`, depending on the version of the Java DMK runtime that you are using. The Java DMK toolkit can be used to regenerate the proxy classes. See Appendix A, MBean Naming Conventions for more information.
Previous Contents Index Next

Copyright 1994-2004 Sun Microsystems