Documentation Contents
Contents | Previous | Next

Chapter   6

Discovery and Lookup Services

The Java Management Extensions (JMX) Remote API Specification describes how you can advertise and find JMX API agents by using existing discovery and lookup infrastructures. The specification does not define any discovery and lookup APIs specific to JMX technology.

This chapter provides a brief outline of existing discovery and lookup infrastructures that you can use with JMX technology, in the following sections:

For more information about these infrastructures, see the “References” section of the Java Management Extensions Remote API 1.0 Specification.

Getting Started With Lookup Services

Lookup services can be used by JMX agents and JMX clients. A single Java VM can contain many JMX agents and/or JMX clients.

  • One MBean server
  • One or more JMX connector servers that allow remote clients to access the MBeans contained in that MBean server

The Java Management Extensions (JMX) Technology Tutorial and its accompanying examples demonstrate how to use lookup services to advertise and find JMX agents. The procedure is similar for all three infrastructures. The main difference is that in SLP and JNDI, the agent registers addresses with the lookup service, whereas when using the Jini network technology, the agent registers a JMX connector stub with the lookup service.


Note – The use of existing discovery and lookup services is optional. Alternatively, you can encode the addresses of your JMX API agents in the form of URLs, and communicate these URLs to the manager.

Using the Service Location Protocol (SLP)

The Service Location Protocol (SLP) provides a framework that allows networking applications to discover the existence, location, and configuration of networked services in enterprise networks.

The following steps summarize the procedure defined in the JMX Remote API specification for using the SLP lookup service to advertise and find JMX agents:

  • The agent creates one or more JMX connector servers.
  • For each connector to expose, the agent registers the address with the SLP lookup service, possibly giving additional attributes that qualify the agent and/or the connector, and can be used as filters.
  • The client queries the SLP lookup service, and retrieves one or more addresses that match the query.
  • Finally, the client obtains a connector that is connected with the server identified by a retrieved address.

The JMX Remote API specification defines URL schemes which are compliant with the SLP protocol. See the Java Management Extensions (JMX) Remote API Specification. The specification also defines mandatory and optional SLP lookup attributes that are provided at registration time.

Using the Jini Network Technology

The Jini Network Technology is an open software architecture that enables developers to create services that are adaptable to changes in the network. The Jini specification offers a standard lookup service. A running Jini lookup service can be discovered with a simple API call.

The following steps summarize the procedure defined in the JMX Remote API specification for using the Jini lookup service to advertise and find JMX agents:

  • The agent creates one or more JMX connector servers.
  • For each connector to expose, the agent registers a JMX connector stub with the Jini lookup service, possibly giving additional attributes that qualify the agent and/or the connector, and can be used as filters.
  • The client queries the Jini lookup service, and retrieves one or more connector stubs that match the query.
  • Finally, the client connects directly to the server using the provided connector stub.

The JMX Remote API specification defines bindings with Jini technology based entries. See the Java Management Extensions (JMX) Remote API Specification. The specification also defines mandatory and optional entries to specify when registering an agent connector.

Using the Java Naming and Directory Interface (JNDI) API With an LDAP Backend

The Java Naming and Directory Interface (JNDI) API is a standard extension to the Java platform. It provides Java technology-enabled applications with a unified interface to a number of naming and directory services.

The JMX Remote API specification details how an LDAP server can be used to store and retrieve information about JMX connectors exposed by JMX agents.

The following steps summarize the procedure defined in the JMX Remote API specification for using the JNDI lookup service:

  • The agent creates one or more JMX connector servers.
  • For each connector to expose, the agent registers the address with the JNDI lookup service, possibly giving additional attributes that qualify the agent and/or the connector, and can be used as filters.
  • The client queries the JNDI lookup service, and retrieves one or more addresses that match the query.
  • Finally, the client obtains a connector that is connected to the server identified by a retrieved address.

The JMX Remote API defines an LDAP schema for registering addresses and explains how a client can discover a registered agent. See the JMX 1.4 Specification for details. The specification also defines a lease mechanism.

 


Contents | Previous | Next

Oracle and/or its affiliates Copyright © 1993, 2018, Oracle and/or its affiliates. All rights reserved.
Contact Us