Next Index


Java Dynamic Management Kit 3.0 Programming Guide


Contents

Preface

Accessing Sun Documentation Online

            Part I. Getting Started

1. Introduction to the JavaTM Dynamic ManagementTM Kit

Overview

Key Concepts
The Core Management Framework
M-Beans
Adaptors
C-Beans

Benefits of the Java Dynamic Management Kit
Dynamic Extensibility and Scalability
Easy Management of Java Applications
Easy Development of Smart Agents
Protocol Independence

Product Components
Framework
Adaptors
Services
Tools
Default Base Agent
SNMP Manager API

Overview of the Development Process
Writing the M-Beans
Testing M-Beans With a Web Browser
Designing the Base Agent
Generating a C-Bean
Testing M-Beans With the job Tool
Developing a Manager in the Java Language

2. Tutorial Example

Developing an M-Bean

Developing an Agent
Initializing the Framework
Adding the Metadata Service
Adding Adaptors
Compiling and Running the Agent

Generating a C-Bean
To Generate the Example C-Bean
To Compile the Example C-Bean

Developing a Manager
Instantiating an Adaptor Client
Connecting an Adaptor Client
Creating an M-Bean Remotely
Performing Management Operations
Disconnecting an Adaptor Client
Compiling and Running the Manager

Further Examples

            Part II. Using Java Dynamic Management Kit Core Technology

3. Design Patterns for Developing M-Beans

Introduction

Properties
Simple Properties
Boolean Properties
Indexed Properties

Event Sources
Multicast Event Sources
Unicast Event Sources

Initializing and Deleting an M-Bean
Initializing an M-Bean - initCmf Method
Deleting an M-Bean - deleteCmf Method

Actions

4. Operations on M-Beans

Object Name
Domain
Class
Search Key
Syntax of an Object Name

Registering an M-Bean
Registering an Existing M-Bean
Instantiating and Registering an M-Bean in a Single Operation
Assignment of Object Names
Registration of M-Beans in Persistent Storage

Retrieving M-Beans
Retrieving M-Beans Using Object Names
Retrieving M-Beans Using Filters

Getting and Setting Properties
Getting a Property
Setting a Property
Using an Operator to Set a Property

5. Adaptors

Supplied Adaptors
RMI Adaptor
HTTP/TCP Adaptor
HTTP/UDP Adaptor
HTTP/SSL Adaptor
HTML Adaptor
IIOP Adaptor
SNMP Adaptor

Adding an Adaptor to an Agent

Access to an Adaptor

Operation of the Adaptors

Access Control
Authentication
Access Control Using an ACL file
Access Control Using an ACL object
Access Control for the RMI Adaptor

Implementing an Adaptor

6. C-Beans

Overview of the mogen Compiler

Command for Starting mogen
Options for mogen
Example

Output of the mogen Compiler
Mapping Rules
Methods Present Only in C-Beans

Using the Generated Code
Developing Applications With Code From mogen
Modifying the Code Generated by mogen

7. Adaptor Clients

Operation of the Adaptor Clients

The adaptorMO Interface
Use of C-Beans by the adaptorMO Interface
Mapping Rules for Class Names

Supported Protocols
RMI Adaptor Client
HTTP/TCP Adaptor Client
HTTP/UDP Adaptor Client
HTTP/SSL Adaptor Client
IIOP Adaptor Client

Initializing an Adaptor Client
Adding an Adaptor Client to the Manager
Connecting an Adaptor Client
Authentication

Required Services
Mapping Service
Class Loader

Operations on an Agent
Retrieving M-Beans
Getting Properties of M-Beans
Setting Properties of M-Beans
Instantiating M-Beans
Transferring M-Bean Instances
Deleting M-Bean Instances

            Part III. Problem Solving

8. Tools for Browsing M-Beans

Tools Provided
M-Bean Browser Web Page
The job Tool

The M-Bean Browser Web Page
Connecting a Web Browser to an Agent
Operations on an M-Bean

The job Tool
Starting and Connecting the job Tool
The job Tool Window
Changing Your View of M-Beans
Operations on an M-Bean

Information for Instantiating an M-Bean
Components of the Object Name of the M-Bean
Other Options

9. Troubleshooting

Printing Debug Messages
Specifying the Trace Level
Specifying the Destination of Debug Messages
Starting the Default Base Agent in Debug Mode

Setting the Class Path

Threads With Native Methods

Getters and Setters in a C-Bean

Missing Value Change Events

Adaptor Client Local Exceptions

            Part IV. Using the Supplied Services

10. Base Services - Customizing the Framework

Initializing the Framework

Repository Service
Supplied Repository Services
Volatile Repository
Persistent Repository
Implementing Your Own Repository Service

Activation Interface

Metadata Service
Changing the Metadata Service

Filtering Service

Relationship Service
Model
Implementing a Relationship Service

11. Dynamic Loading Services

Class Loaders
RMI Network Class Loader
M-Let Service Class Loader
Bootstrap Service Class Loader
Loader Repository
Instantiating a Remote M-Bean Using a Specific Class Loader
Implementing a Class Loader

Library Loaders
Including Native Code in an M-Bean
Location of Native Libraries

Security Manager

Code Signing

12. Class and Library Loading Service

Class and Library Server
Starting the Class and Library Server
Retrieving and Updating Search Paths
Implementing a Class and Library Server

Class and Library Loader
Object Name of an RMI Network Class Loader
Adding an RMI Network Class Loader Through a Manager
Directly Adding an RMI Network Class Loader
Instantiating a Remote M-Bean Using the RMI Network Class Loader

Using the Library Loading Service
Library Versioning
Libpath in RMI Network Class Server
Libpath in RMI Network Class Loader
Loading a Library From the Local File System
Loading a Library From the Class Server

Security Manager

Code Signing

13. M-Let, Bootstrap and Launcher Services

M-Let Service
The MLET Tag
Adding the M-Let Service
Loading an M-Let Text File
Exception Handling
Object Name of the M-Let Service Class Loader
Specifying the Object Name of the M-Bean
Instantiating an M-Bean From Another M-Bean
Instantiating and Running an M-Bean
Caching and Version Control

Bootstrap Service
Use of the MLET Tag in the Bootstrap Service
Loading an Application Using the Bootstrap Service
Using the Bootstrap Service to Load the Java Dynamic Management Kit
Running the Bootstrap Service

Using the Library Loading Service
Default Temporary Library Directory
Loading a Library From the Local File System
Loading a Library From a .jar File

Security Manager

Code Signing

Launcher Service
Packaging of the Application Code
Adding the Launcher Service to an Agent
Adding Code for Starting the Launcher Service
Search Paths for MLET Text Files
Loading a Single M-Let Text File
Example

14. Event Handling, Alarm Clock, and Monitoring Services

Event Handling Service
Event Objects
Listeners
Listener Methods in an M-Bean
Developing a Manager to Receive Events
Defining Your Own Event Handler

Alarm Clock Service
Setting the Alarm Clock Timeout
Getting the Alarm Clock Timeout

Scheduler Service
Scheduler Listener
Scheduler Events
Starting and Stopping the Scheduler
Scheduler Event Handling

Monitoring Service
Types of Monitor
Adding a Monitor
Listening for Monitor Events
Specifying the Property to be Monitored
Setting the Granularity Period
Setting Parameters for Counter Monitors
Setting Parameters for a Gauge Monitor
Starting and Stopping a Monitor

Discovery Service
Discovery Search Service
Discovery Support Service

15. Cascading Agent Service

            Part V. Interoperating With SNMP

16. The SNMP Toolkit

SNMP Adaptor

SNMP MIB Compiler - mibgen

SNMP Manager API

17. The mibgen Compiler

Using the mibgen Compiler
Options for mibgen

Output From the mibgen Compiler
Representation of the Whole MIB
Representation of the Whole MIB in a MibStore
Classes Representing SNMP Groups
Classes Representing SNMP Tables
Classes Representing SNMP Enumerated Types
Information Mapping

18. Developing SNMP Agents With the Java Dynamic Management Kit

SNMP Agent Overview
Integrated Agents
Standalone Agents

Overview of the Agent Development Process

Implementing Access Methods
Implementing Access Methods for Simple Groups
Implementing Access Methods for Tables and Entries

Loading MIBs Into an SNMP Adaptor
Port Allocations
Initializing a MIB Within the Framework
Initializing a MIB in a Standalone Agent
Binding a MIB to an SNMP Adaptor
Statically Loading a MIB
Dynamic Loading

19. Developing SNMP Managers With the Java Dynamic Management Kit

SNMP Manager Overview
SNMP Peer
SNMP Parameters
SNMP Session
SNMP Request

Operation of the SNMP Manager
Synchronous Mode
Asynchronous Mode

Loading Metadata Into the MibStore

SNMP Traps
SNMP v1 Traps
SNMP v2 Traps

Polling

            Part VI. Supplementary Information

A. JAR File Structure

B. Environment Variables

Solaris Operating Environment
JAW_HOME
PATH, CLASSPATH and LD_LIBRARY_PATH
Using the Supplied Shell Script

Windows NT Environment
JAW_HOME
PATH and CLASSPATH
Using the Supplied Batch File

C. Java Packages Supplied With the Java Dynamic Management Kit

Reference Packages

Implementation Packages

SNMP Packages

Tools Packages

D. Java Beans Development Kit Example

Directories and Files

Making a Manageable JavaBeans Component

Compiling the Agent

Using the Java Beans Development Kit With the Agent Example
To Set a Property Using the BeanBox

E. The Default Base Agent

Starting and Stopping the Base Agent in the Solaris Environment

Starting and Stopping the Base Agent in the Windows NT Environment

Glossary



Copyright 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California 94303 U.S.A.
Copyright in French


Next Index