文章目录
This chapter covers
Exposing Spring beans as managed beans 将Spring bean暴露为MBean
Remotely managing Spring beans 远程管理Spring Bean
Handling JMX notification 处理JMX通知
- Java Management Extensions (JMX) Java管理拓展
- Managed bean (MBean) 托管Bean
- Standard MBean
- Dynamic MBean
- Open MBean
- Model MBean
Exposing Spring beans as MBeans
Exposing methods by name 通过名称暴露方法
MBean info assembler MBean信息装配器
Using interfaces to define MBean operations and attributes 使用接口定义MBean的操作和属性
Working with annotation-driven MBean 使用注解驱动的MBean
Handling MBean collisions 处理MBean冲突
Remoting MBeans 远程MBean
JCP(Java Community Process) produced JSR-160, the Java Management Extensions Remote API Specification Java管理扩展远程访问API规范
Exposing remote MBeans 暴露远程MBean
Remoting protocol options:
- Remote Method Invocation (RMI) 远程方法调用
- SOAP
- Hessian/ Burlap
- Internet InterORB Protocol (IIOP)
Accessing remote MBean 访问远程MBean
MBeanServerConnectionFactoryBean
MBeanServerConnection
- getMBeanCount()
- queryNames()
- getAttribute()
- setAttribute()
- invoke()
Proxying MBeans 代理MBean
MBeanProxyFactoryBean
@Bean
public MBeanProxyFactoryBean remoteSpittleControllerMBean(
MBeanServerConnection
mbeanServerClient) {
MBeanProxyFactoryBean proxy = new MBeanProxyFactoryBean();
proxy.setObjectName("");
proxy.setServer(mbeanServerClient);
proxy.setProxyInterface(SpittleControllerManagedOperations.class);
return proxy;
}
Handling notiflcations 处理通知
NotificationPublisherAware
Listening for notification
javax.management.NotificationListener
MBeanExporter