Introduction
In this chapter, we will look at the importance of monitoring your Oracle SOA Suite application. The topics covered include how to configure monitoring, what to monitor, and how to interpret the data that your monitoring tool returns.
Performance monitoring is the key to any successful tuning strategy. In order to improve the performance, you need to be able to measure before and after any changes you make. This can, of course, be done with simple performance testing tools, but these only give you the top-level results. What we want to do is dig deeper down and work out where time is being spent, and which monitoring tools allow us to do.
The term monitoring covers a wide range of tools and techniques, from simple systems that just tell us if a process is running or not, through complex user-experience monitoring tools that break down each user request into component parts, and can show what time and resources were involved in generating the response. The most value is obtained by tools that can look inside your SOA Suite application, giving a breakdown of how busy individual components and services are. These types of monitoring tools are often referred to as Application Monitoring tools.
The other huge advantage of having good monitoring tools in place is the ability to store metrics, so that you can go back and look at past figures, to see if performance has changed over time or whether what you are looking at is something that has always been there.
A lot of the recipes in this chapter use the VFabric Hyperic HQ tool from VMWare. This tool is part of VMWare's suite of middleware, and is available in the community and enterprise versions. We have chosen to use Hyperic, because it is the best general-purpose monitoring suite that we have found, allowing monitoring at all levels of the Oracle SOA Suite stack. It is also one of the easiest to use, and the enterprise version comes with many powerful features.
There are also many other monitoring tools, which can provide similar features, all of which would be suitable for monitoring our Oracle SOA Suite 11g applications. If you already have an existing application monitoring tool that provides the same information that we get here, then there is no need to replace it. We chose not to use the monitoring features of Oracle Enterprise Manager for a number of reasons. Firstly, we feel that the monitoring is not as comprehensive as provided by dedicated application monitoring tools, secondly it does not provide an extensible framework, and finally the licensing is expensive and restrictive. If you have a larger budget for monitoring, then the tools by Dynatrace and CA (Introscope) are excellent tools, but they come at a price that puts them out of the reach of most projects.
The monitoring in this chapter makes use of JMX, which has been a core component of the Java SE platform since Java 5. JMX provides an API and protocol for exposing management metrics and operations from Java applications. JMX centers on the concept of the Management Bean, or MBean, which is a Java Bean responsible for exposing management metrics and operations for a component or service. MBeans can be written by anyone, and contain any metrics, operations, or logic that you wish; they just need to implement a simple interface. MBeans are registered with an MBean Server using a name (their object name), which acts as a directory, allowing other systems to look up and access the MBeans. Protocol adapters then make the MBean server and its MBeans available over a variety of protocols. This simple, yet powerful API has made it very simple to expose management interfaces for Java applications, and nearly all modern Java infrastructure components will have a JMX interface.
By writing your own MBeans, you can expose management information about the internals of your own application, and make that information available to monitoring tools, such as Hyperic.
The key thing to take away from this chapter is the type of things that you should be monitoring, rather than having to use specific tools.