Monday Dec 07, 2009

TOTD #116: GlassFish v3 Administration using JavaFX front-end - JNLP available

As mentioned in TOTD #113, this Tip Of The Day (TOTD) provides a working version of the JavaFX front-end for GlassFish v3 administration.

Please click here to launch the JNLP or click here to a page that provides some introduction along with the link to JNLP. You may like to enable Java Console as explained in TOTD #114 for any log messages.

See a video of the tool in action:

Many thanks to Rajeshwar for providing feedback and helping me understand the RESTful interface better. TOTD #96 explains how the REST interface can be used.

Here is a TODO list in no particular order:

  • Show a splash screen after the startup to indicate server status
  • Allow the administration host/port to be changed
  • Tie the "server stats" with the server uptime instead of fetching once and then binding it locally
  • Provide dynamic updates of the monitoring data, currently its a snapshot
  • Convert the monitoring levels text boxes to radio buttons
  • Provide complete hints on setting monitoring level based upon the engines
  • Enable/Disable the buttons based upon the status of server running (or not)
  • Introduce charts to track dynamic shrink/expand of threads/pools/etc.
  • Probably something else that I'm forgetting :-)

How are you using JavaFX with GlassFish ?

How will you use GlassFish v3 REST interface in your tools ?

Technorati: totd javafx glassfish v3 rest web jruby rubyonrails rest administration monitoring management

Tuesday Nov 10, 2009

TOTD #113: JavaFX front-end for GlassFish v3 Administration - Using REST interface

GlassFish v3 provides a REST interface to management and monitoring information as discussed in TOTD #96. As mentioned in that blog "the REST interface is a lower level API that enables toolkit developers and IT administrators to write their custom scripts/clients using language of their choice". This blog introduces a tool that uses the REST API to provide management and monitoring of GlassFish v3 and is written using JavaFX.

This tool is only a proof-of-concept that demonstrates that GlassFish v3 REST interface is functionally very rich and can indeed be used to write third-party administration tools. The tool uses a subset of the REST interface and exposes only a limited amount of management and monitoring capabilities otherwise exposed. After all this is a proof-of-concept :-)

A screencast of this tool in action along with a downloadable JNLP version will soon be available. For now, here is a snapshot of the main window of this tool:

The main screen allows you to enter a URL for the GlassFish administration. Then the GlassFish instance can be stopped/restarted from the main window using the buttons on top right. There is an animation at the bottom of the screen where the glassfish is swimming in the ocean and is directly related to the state of server running in the background. If the server is running, the animation works. If the server is not running then the animation stops as well.

The main screen has three main buttons:

  • "List Applications" - list all the applications deployed on the running instance
  • "Show Monitoring Levels" - show/Update all the monitoring levels
  • "Server Stats" - show statistics of the running server

Clicking on "List Applications" shows the list of applications deployed on this particular instance. Here is how a snapshot looks like for an instance running on my localhost at port 4848:

As shown in the screen, it shows a radio-bulleted list of all the applications. Each bullet is also accompanied by an image indicating the type of application - Web or Rails for now. Select the application and click on "Monitor" button to monitor that particular application. The REST API exposes a vast amount of monitoring data but a subset of monitoring data is displayed for Web and Rails application for now. Here is a snapshot of the monitoring data published for a Web application:

As evident by the list of engines, this web application has EJBs bundled as well. It also shows total number of Servlets/JSPs loaded, number of requests made to this web application and some other monitoring data.

Here is a snapshot of the monitoring data published for a Rails application:

It shows number of JRuby runtimes configured for the application, number of requests sent to the application, number of responses with different HTTP access codes and some other data.

The monitoring levels of different containers can be easily updated by clicking on "Show Monitoring Levels" as shown below:

And finally some server statistics are shown by clicking on "Server Stats" as shown below:

It shows when the server was started, host/port information, version and finally how long the server has been running for. The dials are an animation that shows the server up time.

Here are other related JavaFX and GlassFish related blogs published earlier:

How are you going to use the REST interface exposed by GlassFish v3 in your environment ?

Are you using JavaFX with GlassFish together in any way ?

Leave a comment on this blog if you do!

Technorati: javafx glassfish v3 rest web jruby rubyonrails rest administration monitoring management

Thursday Jan 18, 2007

New WSIT Plug-in coming

What does GlassFish v2 + NetBeans 5.5.1 IDE + WSIT plug-in give you ?

If you read my blog, then you know the answer. If not, then this is a recipe to create Interoperable (with Microsoft .NET 3.0 framework), Secure, Reliable, and Transactional Web services easily in an intuitive manner.

If you use NetBeans Update Center to install the WSIT plug-in, then the version released with WSIT Milestone 2 will be installed. The plug-in has been updated since then (see below on how to install the updated plug-in) for the reasons given below.

  • The plug-in is now a module suite consisting of two NetBeans modules (.nbm files), "Web Services Interoperability Technology Support" (WSIT Support) and "Web Services Interoperability Technology WSDL Extensions" (WSIT WSDL Extensions). The WSIT Support  module relies upon the WSIT WSDL Extensions module and allows a cleaner separation between the view (UI) and the model (WSDL). On the NetBeans Update Center (when they are available), these modules will be available as one download option keeping it simple for you.
  • Splitting the module into two allows modularization and only the required module to be loaded. 
  • The WSIT configuration (reached by clicking "Edit Web Service Attributes";) is now more intuitive and extensible. Instead of splitting into two separate tabs (Messaging and Security), all the WSIT feature can be configured on one tab. This makes configuring multiple attributes such as security and reliability easy for and endpoint.

How to install the plug-in ?

  1. If a WSIT plugin is already installed, it is recommended to uninstall it. Go to Tools, Modules Manager menu and select the "Web Services Interoperability Technology Support" module and click on Uninstall. You may have to Sort the module names by Name to view the module.
  2. Download the updated modules.
  3. Click on Tools, Update Center menu and choose the "Install Manually Downloaded Modules (.nbm files) ". Follow rest of the process from here. The selected modules will look like this.
  4. Once installed, the modules will appear in Tools, Module Manager window as shown here

These new modules will replace the existing WSIT module when the the next WSIT milestone is released.

Technorati: WSIT GlassFish NetBeans Web service


profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.

Java EE 7 Samples

Stay Connected


« June 2016