Dennys
Dennys

Reputation: 609

Use JMX (MBean) to log WebLogic status

I know we can use MBean to get WebLogic's status. For example, use JDBCDataSourceRuntimeMBean (http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e13951/core/index.html) to get the JDBC status. And use other MBeans, we can also get the status of EJB, WebService, ...

But this is just the status at that time, if I want to monitor the history, for example, I want to know the detail run time of every EJB transaction, is it possible?

The purpose is we want to monitor our application performance, an obvious solution is add log in our EJB and parse it. But if we can get it from server without write code, it will be better.

Another question is, since JMX is a standard and JBoss supports it. If the solution can support both WebLogic and JBoss will be better.

Update:

I read the WebLogic document and found that WLDF is good.

The following are the official document and a tutorial.

Collected Metrics

Instrumentation:

The only inconvenient is the syntax of pointcut. If I want to monitor several methods in a class, I need to write several wldf-instrumentation-monitor tags. Unless I can find a wild card pattern to describe them.

Upvotes: 1

Views: 2145

Answers (1)

Musannif Zahir
Musannif Zahir

Reputation: 3029

It's definitely possible but it might be easier for you to use the existing WLDF framework - You can define which MBeans you want to track, store historical data to a filestore and graph them within the console.

I don't recommend the route of logging debug statements, especially in a production environment. Depending on the throughput of your system, the additional I/O from logging can be a significant overhead.

JMX is the standard way to access your runtime beans but they are going to differ between WebLogic and JBoss. In my personal experience, unless you're using an enterprise solution such as CA Wily's Introscope, you're better off using the individual programs written specifically for the application server as they usually highlight other metrics you may be interested in (If you have the time to traverse all MBeans and determine how useful they are, this may not be of concern).

Hope that helps!

Upvotes: 2

Related Questions