GlassFish Project -
HTTP/S JMX Connector home page
The Administrative Infrastructure of Glassfish Application Server revolves
around JMX. A key component of JMX is being able to remotely connect to the
MBeanServer. JSR 160 (which
is now JSR 255) is an extension
of JSR 003 that dealt with
this problem alone. Because of the far reaching impact of this development
in management of Java, JMX and JSR 160 were incorporated
into Java 5 SE.
Introduction of JMX in Java 5 SE however, mandated that the remote management
of a JMX-instrumented VM be done over RMI/JRMP as a standard. Though RMI is
a well known protocol, unfortunately it is not accepted as an industry standard
if HTTP can be utilized. Application Server's administration has been done
over HTTP and HTTP/S and that was the basic reason why we had to come up with
a proprietary implementation of JSR 160 over HTTP/S.
JMX Connector News
- It will soon be possible to connect to Glassfish Administration Infrastructure
over HTTP/S using JConsole. Watch out for the details ...
- Remote Notification support is added to the HTTP/S JMX Connector recently.
|Several different software components including source and
binary, support the GlassFish project. The source components are
released under the Common
Development and Distribution License (CDDL) v1.0 whereas the binary
components are covered under the binary
license. You must agree to these licenses as part of installation
before viewing and/or using the code.
The basic reason why we had to do a Glassfish-proprietary
implementation of JSR 160 specification over HTTP is twofold:
- Reuse the administration port that is known to a human administrator.
It is important that the administrator has to remember one single port
for administration independent of the tool he uses to manage. The tool
can be a command line interface, HTML Graphical user interface (GUI) or
an IDE. If we had used the RMI/JRMP connector server, it would have needed
its own port, whereas the HTML pages that GUI needs are served by the
- HTTP allows remote administration of an appserver domain from other
machines (especially outside the secure firewall) more seamlessly (than
RMI, for HTTP tunneling of RMI would be needed).
It is interesting to see how Glassfish resolves the need for multiple ports
of administration. At its core, the server side implementation alleviates
the need for a TCP Server Socket by the virtue of a servlet that is running
on the web-container port. Since we know that multiple web applications can
be served by the web-container simultaneously, a special web application can
act as a server side implementation of JSR 160. The following structure emerges:
- A servlet reads its standard input stream (decorated to be an ObjectInputStream)
for Serialized Java Objects.
- The client side implementation is retrofitted into the JSR 160 standard
to use proprietary protocols named "s1ashttp" and "s1ashttps"
to denote and search the appropriate handlers.
- The client side then opens HttpURLConnection and HttpsURLConnection to
write to servlet's input stream.
- The connection is authenticated using HTTP Basic-Auth.
- Servlet deserializes the Objects it receives on its InputStream, invokes
the MBeanServer associated and returns the results in exactly the same manner
that it read. The client side reads the response, deserializes it and returns
the values or throws the exceptions that were thrown by MBeanServer invocation.
- Quicklook tests should be run as all the asadmin client commands
depend on this layer.
devtests should be run.
- Extra care must be exercised to make sure that there are no regressions
as this code is shared by other products as well.