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.
- Collected Metrics: This can collect server information. I use it to collect JDBC status into a database.
- Instrumentation: I use this to record the execute time of a method
The following are the official document and a tutorial.
Collected Metrics
- Official doc: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/wldf_configuring/config_harvester.html
- Blog tutorial: http://weblogic-server.blogspot.com/2009/12/configuration-diagnostics-jdbc-store.html
Instrumentation:
- Official doc: http://download.oracle.com/docs/cd/E11035_01/wls100/wldf_configuring/config_instrumentation.html
- Blog tutorial: http://m-button.blogspot.com/2008/11/using-wldf-to-trace-time-taken-by-your.html
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.