Contents:
IntroductionThis is a simple example to illustrate the use of dynamic loading of management
applet (MLet).
__________________________________________________________________________________________________________________________
Let us say MBeans present at a remote place wants to get registered/managed
with the local Multi-Protocol (JMX) server. The javax.management.loading.MLet
mbean allows us to achieve this.
__________________________________________________________________________________________________________________________
Source files
The main source file is,
Consider, MBeans in local Multi-Protocol MBeanServer as,
To compile the source files go to AdventNet/JavaAgent/examples/jmx/mlet directory in the command prompt and type,
compile *.java [Windows]
sh compile sh *.java [Linux/Solaris]
This will compile the source files in the respective directory.
To start the agent go to AdventNet/JavaAgent/examples/jmx/mlet directory in the command prompt and,
1. Run the startServer.bat/sh to start the remote web-server for downloading the mlet.(starts at port 8080, as specified in AdventNet/JavaAgent/etc/MletServer.xml file.)
2. Also run the run.bat or run.sh.
By default,
(a) RMI registry service will be started at port 1099
(b) HTML Adaptor will be started at port 8030.
1. Use any webbrowser to connect to the Multi-Protocol (JMX) server (through HTML adaptor) by specifying the URL as http://localhost:8030
2. Use MBean browser to access the data through RMI/CORBA/HTTP ( start MBean browser using MBeanBrowser.bat/MBeanBrowser.sh in AdventNet/JavaAgent/bin directoy)
3. Now to register the remote mbeans, select the MLet mbean in MBean/WebBrowser
(a) invoke the method "void getMBeansFromURL(java.lang.String)" with parameter
as "http://localhost:8080/sample-mlet.txt"
(b) now the mbean MLetGroup:description=myPackage.MySample gets registered
and updated in the main mbeans list view of the browser as specified in the
mlet file.
(c) Now the remote mbeans are configurable through the adaptors
__________________________________________________________________________________________________________________________
Copyright (c) 1996-2004 AdventNet, Inc. All Rights Reserved.