Index Changes
ESB Console Home

How do I enable Common Management and Monitoring support for a Glassfish v3 with Fuji instance

To enable Common Management and Monitoring support for a Glassfish v3 with Fuji instance, you need the following:

  1. Install the fuji-management-hk2 archive that enables the management backend in your Fuji-Glassfish v3 runtime - can be built from esb-console/fuji-management-hk2
  2. Install the eventmanagement-webapp archive in your Fuji-Glassfish v3 runtime - A backend web application implementation (eventmanagement-webapp) that pushes alerts to subscribed clients through reverse-ajax - can be built from esb-console/extended/alerts/eventmanagement-webapp.

You would then need to use the Common Management and Monitoring API and write client code to access the functionality.

  • You will need jbi-admin-common.jar in your client side classpath
  • Include the extended.management.api.core archive that enables the extended core management client side API in your client side classpath - can be built from esb-console/extended/api/extended.management.api.core - and include it in your client classpath.

The previously mentioned jars are mandatory for any client side code. In addition, you'd also want to include other Common Management and Monitoring API client side jars. For e.g., to receive alerts, you need to include the extended.management.api.alerts archive in your client side classpath - that enables the alert reception, and management client side API - can be built from esb-console/extended/api/extended.management.api.alerts - in you client side classpath. There are a number of APIs available under esb-console/extended/api/. Have a peek and use the ones you need while writing your client code.

Download

It is always better to Checkout and Build from scratch. However, if you want to try out the Management and Monitoring capabilities without having to build it from scratch, I will infrequently upload a jar file at my convenience that you can download from here fuji-glassfish-manmon.jar(info) that you can deploy to your standalone Fuji instance and test according to instructions mentioned below:

Installation

Step 1: - Download and extract the pre-built jars

Extract the jar into a directory of your choice:
jar -xvf fuji-glassfish-manmon.jar
The contents are expanded to a core folder which has an backend folder that contains the fuji-management archive, and the FujiEventManagementWebApp archive. There is also a client folder that contains the archives that have to be included in your client classpath for you to exercise the management capabilities remotely, viz., jbi-admin-common.jar, and the extended.management.api.core archive.
 Directory of E:\core-hk2

09/17/2009  09:37 AM    <DIR>          .
09/17/2009  09:37 AM    <DIR>          ..
09/17/2009  09:38 AM    <DIR>          backend
09/17/2009  09:37 AM    <DIR>          client
               0 File(s)              0 bytes

 Directory of E:\core-hk2\backend

09/17/2009  09:38 AM    <DIR>          .
09/17/2009  09:38 AM    <DIR>          ..
09/14/2009  10:15 AM           406,156 eventmanagement-webapp.war
09/10/2009  03:48 AM           731,675 fuji-management-hk2.jar
               2 File(s)      1,137,831 bytes

 Directory of E:\core-hk2\client

09/17/2009  09:37 AM    <DIR>          .
09/17/2009  09:37 AM    <DIR>          ..
09/10/2009  03:41 AM           482,191 extended.management.api.core-1.0-SNAPSHOT.jar
05/14/2009  01:20 AM           360,075 jbi-admin-common.jar
               2 File(s)        842,266 bytes

     Total Files Listed:
               4 File(s)      1,980,097 bytes

Copy the fuji-management-hk2.jar to your /glassfish/modules folder, and start Glassfish v3

Once Glassfish v3 is up and running, install the web application

E:\runtimes\osgi\glassfish\m8\glassfishv3\glassfish\bin>asadmin deploy --contextroot eventmanagement-webapp --force=true --upload=true --enabled=true E:\core-hk2\backend\eventmanagement-webapp.war

Command deploy executed successfully.

E:\runtimes\osgi\glassfish\m8\glassfishv3\glassfish\bin>

You can then exercise the management and monitoring capabilities of the runtime using the management and monitoring API. Make sure you client side code includes the mandatory client jars available in the client folder in addition to any other jar file you use in your client classpath.

URLs of interest

Java CAPS Management and Monitoring APIs

Java CAPS Common Management and Monitoring API JavaDocs

The Extended Java CAPS Management and Monitoring API JavaDocs


Back to to How Tos


Number of visits: 28

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-6) was last changed on 07-Nov-09 14:33 PM, -0800 by Gopalan Suresh Raj