JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Add-On Component Development Guide
search filter icon
search icon

Document Information

Preface

1.   Introduction to the Development Environment for GlassFish Server Add-On Components

2.  Writing HK2 Components

3.  Extending the Administration Console

4.  Extending the asadmin Utility

5.  Adding Monitoring Capabilities

Defining Statistics That Are to Be Monitored

Defining an Event Provider

Defining an Event Provider by Writing a Java Class

Defining Event Types in an Event Provider Class

Specifying Event Parameters

Example of Defining an Event Provider by Writing a Java Class

Defining an Event Provider by Writing an XML Fragment

Packaging a Component's Event Providers

Sending an Event

Updating the Monitorable Object Tree

Creating Event Listeners

Representing a Component's Statistics in an Event Listener Class

Subscribing to Events From Event Provider Classes

Registering an Event Listener

Dotted Names and REST URLs for an Add-On Component's Statistics

Example of Adding Monitoring Capabilities

6.  Adding Configuration Data for a Component

7.  Adding Container Capabilities

8.  Creating a Session Persistence Module

9.  Packaging, Integrating, and Delivering an Add-On Component

A.  Integration Point Reference

Index

Dotted Names and REST URLs for an Add-On Component's Statistics

The GlassFish Server administrative commands get(1), list(1), and set(1) locate a statistic through the dotted name of the statistic. The dotted name of a statistic for an add-on component is determined from the registration of the event listener that defines the statistic as follows:

listener-parent-node.path-to-statistic.statistic-name
listener-parent-node

The node in the monitorable object tree under which the event listener that defines the statistic is registered. This node is passed in the invocation of the register method that registers the event listener. For more information, see Registering an Event Listener.

path-to-statistic

The path through the monitorable object tree from the node under which the event listener is registered down to the statistic in the event listener in which each slash is replaced with a period. This path is passed in the invocation of the register method that registers the event listener. For more information, see Registering an Event Listener.

statistic-name

The name of the statistic. This name is the value of the id element of the @ManagedAttribute annotation on the property that represents the statistic. For more information, see Representing a Component's Statistics in an Event Listener Class.

For example, the dotted name of the txcount statistic that is defined in Example 5-5 and registered in Example 5-7 is as follows:

server.applications.tx.txapp.txcount

The formats of the URL to a REST resource that represents a statistic is as follows:

http://host:port/monitoring/domain/path
host

The host where the DAS is running.

port

The HTTP port or HTTPS port for administration.

path

The path to the statistic. The path is the dotted name of the attribute in which each dot (.) is replaced with a slash (/).

For example, the URL the REST resource for the txcount statistic that is defined in Example 5-5 and registered in Example 5-7 is as follows:

http://localhost:4848/monitoring/domain/server/applications/tx/txapp/txcount

In this example, the DAS is running on the local host and the HTTP port for administration is 4848.