Thursday Dec 10, 2009

GlassFish REST Interface for Management and Monitoring

GlassFishRESTInterfaceforManagementandMonitoring GlassFish has added yet another tool to its arsenal - REST Interface, a new feature introduced in GlassFish v3. I would like to summarize this feature. In addition to Command Line Interface, Java Management API for GlassFish (AMX) & GlassFish Administration UI, you can now use GlassFish REST Interface to manage and monitor GlassFish. GlassFish REST Interface exposes GlassFish configuration and runtime models as REST URLs. This support is provided/implemented using JSR 311/Jersey.
Architecture Diagram
GlassFish REST Interface is available in full and web distributions.
To use this interface -
1. Install GlassFish using any of the following distributions
    Community full profile
    Community web profile  
    Java EE 6 SDK
    GlassFish Enterprise Server v3
2. Start GlassFish
    <GlassFish Intall Root>/bin/asadmin start-dmain
3. Access the following URL(s) using any http client
  http://localhost:4848/managment/domain

    http://localhost:4848/monitoring/domain


GlassFish REST Interface is exposed on GlassFish administration port (default value: 4848). Root URLs of GlassFish REST Interface are -
http(s)://{host}:{port}/management/domain1
http(s)://{host}:{port}/monitoring/domain2

Where {host} identifies the server host and {port} is the server administration port.

Using management root URL1 you can traverse and discover the entire GlassFish configuration model whereas using monitoring root URL2 you can traverse and discover the entire GlassFish runtime model.


GlassFish REST Interface supports JSON, XML and HTML formats. Based of the client/client request, appropriate format representation is sent to the client. Metadata for given URL(resource), such as methods supported, input parameters for supported methods and their type, can be obtained through GET request on that URL. You can also use OPTIONS method to get the metadata. For more on formats, metadata and other details please refer to REST Interface section of GlassFish Administration guide.

GlassFish REST Interface supports basic authentication over secure channel. For detail on how to secure GlassFish REST Interface please refer to my earlier blog entry or REST Interface documentation.


Other Related Links:
REST Interface Documentation
Securing GlassFish REST Interface
Managing GlassFish using cURL
Sample Client using JavaFX


Let us know, if any, comments, feedback and/or enhancement requests.
About

rajeshwar

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today