GlassFish is an open source application server project led by Sun Microsystems for the Java EE platform. We’d discussed Applications Manager’s GlassFish monitoring capabilities in an earlier post. In this post, we will look into the steps involved in monitoring Java EE web transactions running on a GlassFish server.

You need to create a J2EE Web Transaction Monitor in Applications Manager to monitor the business-critical Java / Java EE web transactions running in a GlassFish server.  The J2EE monitor helps you to better visualize J2EE web transactions end to end, with performance metrics of all components ranging from URLs to SQL queries. It helps you understand which J2EE or Java component is responsible for that performance bottleneck or which SQL query is slowing down your web application, etc.

Here are the steps you need to follow to make this work:

  1. Open and edit domain.xml inside GlassFish domain. For example, edit  C:\glassfishv3\glassfish\domains\domain1\config\domain\domain.xml.
  2. Add a new element <jvm-options>-javaagent:<Path To WebTransactionAgent.jar></jvm-options> inside  </java-config> element and restart GlassFish server.
  3. Check if the web transaction agent has started by checking if port 55555 is occupied (netstat -an |grep “55555”)
  4. Add J2EE Web Transactions monitor running in GlassFish Server in Applications Manager.

This will take care of tracking the key performance indicators of your J2EE web transactions. This monitor, when used in conjunction with the Java runtime monitor and the URL Sequence monitor, helps you keep track of the availability and performance of the GlassFish application server.

  1. Guest: Thanks for the tip.

    You can use ‘find’ if you don’t have grep command in windows.

  2. If you do not have grep command ( in Windows) then you can use (netstat -an | find “55555”)