ajax4jmx  release alpha-2.0 - April 2nd 2007

With this release I have decided to switch to JSON-RPC instead of GWT-RPC. This release implements the basics required for this switch.

Live Demos

JsonRpcDemo is an example of calling a JMX server using json-rpc via http-get and http-post.

TomcatPerformanceDemo is the start for an ajax gui for showing the current performance of a jakarta tomcat server. This first release is a short demonstration of the concept of json-rpc method orchestration. Next releases will continue this implementation.

The live demos from release alpha 1.0 are still active.

JSON-RPC

On the server side we are using JSON-RPC-Java.
We are supporting http-get and http-set.

On client side calling json-rpc within GWT is simple:

        JsonRpcMethod getDomains= new JsonRpcMethod();
        getDomains.setMethod("MBeanServer.getDomains");
        getDomains.setCallback(new RequestCallback()
                    {
                        public void onResponseReceived(Request arg0, Response arg1)
                        {
                          if (arg1.getStatusCode() == 200)
                          {
                              Window.alert(arg1.getText();
                          }
                     }
        getDomains.invoke();


The following classes are currently implemented:

JMX specific classes:
Query Framework
For recurring queries on the server the query framework avoids resending the queries to the server and is used for extending query abilities of the server. This is a general framework which may be used for querying different sources such as JMX Servers, SQL databases etc..

Queries are registered and stored within the QueryRegistry. On registration of a query an id is returned. This id is used for executing a query:

    JSONNumber id = new JSONNumber(1);
    QueryMethod query = new QueryMethod();
    query.setId(id);
    query.setCallback(....);
    query.invoke();

Method Orchestration

Asynchronous calls to the server often lead to cluttered code especially if  we have to make calls in a specified order. J-SOFA project has an elegant solution for this. With this in mind I  have started experimenting with GWT.

Here a short example:

MethodSequence sequence = new MethodSequence();
sequence.add(new JsonRpcMethod("A"));
sequence.add(new JsonRpcMethod("B"));
sequence.start();

This example calls method A waits for a response and then calls method B. We may also add ParameterSetters which will get the response from method A and will set the arguments for method B.

Further changes

Road map



ajax4jmx initial release alpha-1.0 - December 20th 2006


Ajax4Jmx is the first open source (correct me if I am wrong) ajax enabled  framework for building customized user interfaces for JMX.
It is implemented with GWT, Google's Widget Toolkit.

Live Demos

SimpleJmxBrowser is an example of how simple it is to build a jmx browser - using JmxTablesAndButtons in stack layout Single Click Listener and MBeanAttributesTable

RZOMX Job Management Console - using JmxTablesAndButtons in vertical layout and Double Click Listener

NOTE:
The connection and server are slow so you may have to be patient.
You have access to all mbeans please do not abuse. Please do not change the settings of tomcat (MXhttpAdapter mbeans)
If you start processes with the job management console please also stop them. These are real processes not just dummy display.

General Purpose Widgets

The following Widgets are general purpose and can be used without JMX:

JMX specific Widgets
 
The following Widgets are JMX specific and require access to a JMX server.

Implementation Details - TODO -

All Widgets implement the GWTComponent interface. This defines the life cycle contract implemented by the components. The methods must be called in the following order:
On the server side 2 servlets are required:
Quick Start

Download and unzip the file.
Directory structure:
If you are using eclipse import the project and the launch files. All references are relative so it should work without having to set the paths to the libraries.
The current distribution comes with 2 runnables:

If you would like to try it with your own JMX server: create an instance of org.rzo.ajax4jmx.httpadapter.MxHttpAdapter within your jmx server and call the init() and start() methods. Copy webapps directory or set the catalina.home property.

ToDo

a lot. :))

If you have comments, feature requests, suggestions, please discuss them on the GWT  developer forum or on the sourceforge tracker


- Ron