There are tools which can be useful for monitoring 3-tier and web applications, in order to help you in the diagnosis of performance issues.
The main idea is to be able to get useful information, such as variables related to the connection pool, users, cursors, statements, and procedures. In Java, this is implemented using JMX (Java Mangement Extensions) standard.
OC4j (Oracle Containers for J2EE 10g) implements JMX so any JMX console can connect to OC4j.
In particular, the JMX JConsole, shipped with JDK 1.5, can connect to OC4j. In order to use Jconsole, OC4j must run under JDK 1.5.
In this paper, we will concentrate on another JMX console which name is MC4j. Regardless of the JVM version under which OCJ4 runs, you can connect MC4J to OC4j in order to make a monitoring test.
1. Install MC4J console.
2. Start OC4J with the following System Property (you can do it using the web interfase, or by command line):
You arrive to the following window by going through "Cluster Topology -> The corresponding group -> Administration -> Server Properties":
3. The Enable Management property must be set to "Yes".
4. After running the MC4J tool, you have to create a server connection.
The "server URL" format is like this : ormi://server:<rmi port>/webapp
Ports information can be found in OC4J console, (go through "Cluster Topology -> The corresponding group -> Administration -> Server Properties"):
5. The connection wizard dialog will display and take you through a series of steps to configure your connection. In the next step, you will have to choose the installation directory for your server:
6. Customize the classpath that will be used (the default is usually fine):
In general, you will start MC4J console in a client machine, not in the server, so you will need to have a local installation of the same version of the server you are connecting to. An other possibility is to copy the necessary files to the local machine.