Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
J2SE 5.0's monitoring and management support is comprehensive, with remote monitoring capabilities for the Java platform and for applications that run on it. Included in J2SE 5.0 is Java Management Extensions (JMX) remote monitoring, a new addition to the list of monitoring capabilities on a JVM. Java Specification Request 160 is the specification for JMX remote monitoring. It focuses on the mechanism for remote access by building a remote client API for a JMX-based agent.
Tomcat 5.5 is designed to leverage J2SE 5.0's built-in JMX capabilities. Version 5.5 (which was branched based on Tomcat 5.0.27) implements the latest Servlet (2.4) and JavaServer Pages (2.0) specifications and is the result of an extensive redesign and refactoring of the Tomcat server architecture. It proves more stable and improves upon Tomcat 4.x with enhanced performance, scalability and reliability, JMX monitoring, integrated session clustering, and application deployment.
With the latest version of Tomcat and J2SE 5.0's JMX capabilities, we can make the servlet container's attributes and methods available via JMX while simultaneously reducing the complexity of JMX-related code. In this article, I discuss how to launch the Tomcat servlet container with remote JMX monitoring enabled. We also look at a sample Web application that runs in a Tomcat cluster with session replication turned on. And, finally, we use a JMX client to view the details of cluster elements and HTTP sessions. But before we delve into the discussion of remote JMX monitoring, let's look at the components that make up a Tomcat cluster.
A Tomcat cluster consists of six main components: cluster, membership, sender, receiver, replication valve, and deployer.
Table 1 shows how each component makes the clustering and session replication work in Tomcat.
Table 1. Tomcat cluster elements
Fore more details on the clustering elements, refer to Tomcat 5.5's clustering documentation.
Tomcat 5.5 provides several improvements over its predecessors (Tomcat versions 4.1 and 5.0) in terms of clustering, session replication, and server monitoring and manageability. In Tomcat 4, several server components (such as host, engine, and service) could be monitored using MBeans (managed beans). But in Tomcat 5.5, Yoav Shapira, Filip Hanik, and the other Tomcat developers wrote JMX implementations for the cluster elements.
Now that we know the function of each element in a Tomcat cluster, let's look at various JMX client tools used for connecting to a Tomcat server cluster and monitoring the cluster details.
A JMX client is a graphical user interface (client/server or thin client) used to connect to a JMX agent (running on a local or remote machine). An ideal JMX client should have the following features to monitor an application server effectively without incurring any additional overhead:
J2SE 5.0 comes with a JMX client tool called JConsole that can be used to look into the runtime JVM details. Tomcat installation
includes a JMX servlet called
JMXProxyServlet that can view and update Tomcat MBean attributes. It is a lightweight proxy for viewing and manipulating the MBeans running
in a Tomcat container and proves helpful in integrating command line scripts for monitoring and changing Tomcat internals.
Set commands can be used to query the MBeans and modify their attributes and operations respectively.
Other than these two tools, several third-party open source JMX client applications are available (links to which are available in Resources):
In this article, I discuss how to install and configure MC4J to remotely connect to a Tomcat servlet container and monitor all the MBean components in a server cluster.
The MC4J console provides the following capabilities:
I used MC4J 1.2 Beta 9 for this article's sample application. To install MC4J, download the executable (MC4J-12b9-Windows.exe) from SourceForge. Double-click on the exe file and select JDK Home and the MC4J installation directory (c:\dev\tools in the sample setup) when prompted during the installation process.
You must specify some system properties to see the remote JMX monitoring in action. These properties are specified in a properties
management.properties located in the
JAVA_HOME/lib/management directory. Table 2 shows the properties that must be set for JMX monitoring.
|Forum migration complete By Athen|
|Forum migration update By Athen|
|Thanks By Anonymous|