Monitoring Glassfish V3.1.2 Options

There are 2 crucial phases you want to look under the hood of your running Glassfish or inside the JVM underneath: Performance Tuning and Health Monitoring during production.

With JMX (Java Management Extensions, Wikipedia) at hand, there are a few options to choose from.


The graphical monitoring tool is great for local deployment, it allows you to connect to a JVM on the same host or a remote host. It creates line graphs for your for all relevant from the moment you connect, it is perfect to observe a server while you do some testing or other actions, though it does not record any values while you are not connected. I have a hard time to get it running on a remote server and I do not favour the ‘open’ approach (see previous blog entry) which allows anyone to access the JVM with the disabled authentication settings. I also had situations where the JVM was frozen and it was no longer possible to access the JVM for monitoring, here I would rather have snapshots before the problem started together with server.log.



Glassfish Rest Interface

Note: You need to enable the areas you want to monitor with the admin console (or the asadmin command line) because per default all are OFF. Continue reading

Quick Tutorial: Netbeans + Selenium + Hudson (Part 2)

In part 1 of this tutorial (I recommend to walk through it first) we created a simple web application, set up a Hudson server to build it and test it with Selenium. But we left with one major flaw: Hudson build the war file, but the JUnit test the job triggered was tesing an application already deployed to a Glassfish instance. Today we wipe out this problem, setting up a proper sequence of building, deploying and testing the application.

Pre-Requirements (same as in part 1):

  • Netbeans 6.9 (earlier versions certainly work as well)
  • Glassfish
    A local Glassfish that comes with Netbeans is good enough. I am using a Glassfish 3.0.1 running in a VirtualBox.
  • Hudson Server
    Download the war file from here. For the tutorial we will use a local standalone Hudson server.
  • Selenium RC
    Download from here.
  • Sourcecode Repository (SVN)
    In order to use Hudson, it is recommended to have a sourcecode repository like SVN to upload the code.

Continue reading