Example on Dynamic MBean

Introduction

This is a simple example to illustrate the usage of DynamicMBean registered with the Multi-Protocol agent.

Source files

Following are the source files,

The main file 'DynamicJmxAgent.java' has 2 adaptors (HTML/RMI registered with the MBeanServer. Thus the 'AgentSystemInstrument' dynamicmbean can be managed by HTTP/RMI/CORBA

Compilation

To compile the source files go to WebNMS/JavaAgent/examples/jmx/dynamicMBean 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.

Running the Agent

To start the agent go to WebNMS/JavaAgent/examples/jmx/dynamicMBean directory in the command prompt and,

1. Use run.bat or run.sh

          By default,
                (a) RMI registry service will be started at port 1099
                (b) HTML Adaptor will be started at 8030
 
2. Use any webbrowser to connect to the Multi-Protocol server (through HTML adaptor) by specifying the URL as http://localhost:8030

3. Use MBeanBrowser to access the data through RMI Remote browser using MBeanBrowser.bat/MBeanBrowser.sh in WebNMS/JavaAgent/bin directory)

___________________________________________________________________________________________________________

Copyright (c) 2009  ZOHO Corp. All Rights Reserved.