Java Dynamic Management Kit 3.2 Programming Guide | ||||
---|---|---|---|---|
![]() | ![]() | Chapter 5. Adaptors | ![]() | ![]() |
The following adaptors are supplied with the Java Dynamic Management Kit:
RMI
HTTP/TCP
HTTP/UDP
HTTP/SSL
HTML
IIOP
SNMP
The RMI adaptor enables Java managers to access a Java Dynamic Management agent using the Java remote method invocation (RMI) system. By default, the RMI adaptor registers as:
rmi://localhost:1099/com.sun.jaw.impl.adaptor.rmi.AdaptorServer |
The HTTP/TCP adaptor enables Java managers to access a Java Dynamic Management agent using HTTP over a TCP/IP connection. It also allows these management applications to access an agent across proxy servers. By default, the HTTP/TCP adaptor listens for incoming requests on port 8081. The HTTP/TCP adaptor provides login/password authentication.
The HTTP/UDP adaptor enables Java managers to access a Java Dynamic Management agent using HTTP over UDP. By default, the HTTP/UDP adaptor listens for incoming requests on port 8083. The HTTP/UDP adaptor provides login/password authentication.
Note - UDP is a lightweight protocol designed to send messages without requiring an extensive protocol mechanism, it does not provide total reliability. UDP does not divide outgoing messages into datagram packets or sequence incoming messages.
The HTTP/SSL adaptor enables Java managers to access a Java Dynamic Management agent using HTTP over SSL. It also allows these management applications to access an agent across proxy servers. By default, the HTTP/SSL adaptor listens for incoming requests on port 8084. The HTTP/SSL adaptor provides login/password authentication. The HTTP/SSL adaptor server requires client authentication by default.
The behavior of the HTTP/SSL adaptor is governed by the particular SSL implementation used in your applications. The cipher suites that are enabled are the defaults of the SSL implementation. The SSL implementation must be compliant with the SSL Standard Extension API provided by JavaŽ 2 SDK, Standard Edition, version 1.2. If you need to provide your own SSL implementation, you should rewrite the com.sun.jaw.impl.adaptor.https.AdaptorSocket class and replace the one installed with the Java Dynamic Management Kit.
The HTML adaptor is an HTML server that enables web browsers to access a Java Dynamic Management agent through the HTTP communications protocol. When an HTML adaptor is instantiated, it creates a TCP/IP socket and waits for incoming requests. By default, the HTML adaptor listens for incoming requests on port 8082. The HTML adaptor provides login/password authentication.
The HTML adaptor is provided as a tool for debugging and speeding the development of agents. As such, it has certain limitations, for example it does not display complex types nor multi-dimensional arrays. For more information, refer to The M-Bean Browser Web Page in Chapter 8.
The IIOP adaptor enables CORBA clients to communicate with a Java Dynamic Management agent as if it were a CORBA server. The IIOP adaptor allows CORBA clients to create and delete m-beans, get and set properties of m-beans, and perform actions.
The IIOP adaptor uses a CORBA name server. The CORBA name server is specified by the hostname on which the name server is running and the port number. By default, the IIOP adaptor uses the hostname of the local machine and port 8085 as the CORBA naming service location. The CORBA name service must be started before it can be used. To start the name service, you need to run the tnameserv script (Solaris) or batch file (Windows NT), using the -ORBInitialPort switch and specifying the port number:
prompt% tnameserv -ORBInitialPort portNumber |
The CORBA name specifies the following properties of the CORBA environment:
The host on which the name server is running
The port used by the name server
The host on which the Java Dynamic Management agent is running
The m-bean name of the IIOP adaptor
The CORBA name that is stored on the name server has the format:
iiop://nameserver_host:nameserver_port/agent_host/adaptor_name |
Figure 5-1 shows a simple example of a CORBA service. The CORBA client in this example is a third party supplied client, not the IIOP client supplied with the Java Dynamic Management Kit.
The CORBA name service is running on a machine with the hostname hawaii and using port 9876. The name service is started by executing using the tnameserv command on hawaii:
prompt% tnameserv -ORBInitialPort 9876 |
The Java Dynamic Management agent, running on the machine with the hostname summer, instantiates an IIOP adaptor using the CORBA name service running on hawaii. The name used to instantiate the IIOP adaptor is IIOP_adaptor_test. The CORBA name of the IIOP adaptor is:
iiop://hawaii:9876/summer/IIOP_adaptor_test |
The default name of the Java Dynamic Management agent adaptor is:
iiop://hawaii:9876/summer/com.sun.jaw.impl.adaptor.iiop.AdaptorServerImpl |
The tnameserv utility is supplied as part of the JavaŽ 2 SDK, Standard Edition, version 1.2.
The Interface Definition Language (IDL) is used to define the interfaces to CORBA objects. The AdaptorServer.idl file documents the CORBA interface of Java Dynamic Management Kit components. This file is found in the location shown in the table.
Operating Environment | IDL File Location |
---|---|
Solaris | installDir/SUNWconn/jaw/docs/locale/C/JDMKMAIN/ additional/AdaptorServer.idl |
Windows NT | installDir\SUNWconn\jaw\docs\locale\C\JDMKMAIN\additional\AdaptorServer.idl |
Where operations are performed on Java and CORBA objects by the same agent, you must make sure that the correct object type is specified. To avoid problems, you should specify objects as instances of either Java objects or CORBA objects.
The SNMP adaptor enables an SNMP manager to perform management operations on a Java Dynamic Management agent. Before using the SNMP adaptor, you need to configure it for the MIB used by the SNMP manager application. This is explained in Chapter 18.
![]() | ![]() | ![]() |
Adaptors | ![]() | Adding an Adaptor to an Agent |