JMX Usage

There is long times since last time I did use JMX in my project.  Too long to remember all details on how to use JMX.  We can refer to Java website to get more details on how to use JMX: http://www.oracle.com/technetwork/java/javase/tech/best-practices-jsp-136021.html.

In order to keep well understood on JMX, I prefer to write down what's in my mind for the moment. 

MBeanManagementServer

Like any distributed system, there is a registry server in JMX framework: MBeanManagementServer. We can registry MBean to be managed into Management Server and it will allow remote server/client to access those MBean obejct instance to monitor or update resources (components). 

Differences with RMI

We can know the difference between JMX and RMI from: http://stackoverflow.com/questions/5100793/difference-between-jmx-and-rmi.

Where JMX Used

Best Practice to use JMX

update Configuration Parameters during System Running: like Logging Configuration

We can define a MBean to load system configuration parameters. And those parameters can be updated during server running and taken into effective without restarting server.

System Monitoring: like Counters and module usage tracing

We can define some JMX MBean incuding some counters as data type/attribute and it also includes some methods to increment/collect those counters. Those JMX counters can be used to monitor system health and usage.

Using Notification to Observer/Listen remote state change event

We can use JMX Notification feature to establish a event broadcast system.  For example, a data center manage all the system information...

JMX in Web Application Server

JMX in Weblogic

There are several MBean Servers in Weblogic server. 

Weblogic server is constructed based on JMX framwork.

TBD

JMX in Spring

How Spring supports JMX, we can refer to http://static.springsource.org/spring/docs/2.5.6/reference/jmx.html

猜你喜欢

转载自george-gu.iteye.com/blog/1307649
JMX