By default, ConnectorServerFactoryBean creates and starts a JMX connector server bound to the
Messaging Protocol (JMXMP). However, most JMX implementations, including JDK 1.5's, don't support
JMXMP. Therefore, you should choose a widely supported remoting protocol for your JMX connector,
such as RMI. To expose your JMX connector through a specific protocol, you just provide the service
URL for it.
<property name="serviceUrl" value=
You specify the preceding URL to bind your JMX connector to an RMI registry listening on port
1099 of localhost. If no RMI registry has been created externally, you should create one by using
RmiRegistryFactoryBean . The default port for this registry is 1099, but you can specify another one in its
port property. Note that ConnectorServerFactoryBean must create the connector server after the RMI
registry is created and ready. You can set the depends-on attribute for this purpose.
Now your MBeans can be accessed remotely via RMI. When JConsole starts, you can enter the
following service URL on the Advanced tab of the connection window.
Assembling the Management Interface of MBeans
Recall that by default, the Spring MBeanExporter exports all public properties of a bean as MBean
attributes and all public methods as MBean operations. In fact, you can assemble the management
interface of your MBeans using an MBean assembler. The simplest MBean assembler in Spring is
MethodNameBasedMBeanInfoAssembler , which allows you to specify the names of the methods to export.
<property name="assembler" ref="assembler" />
<bean id="assembler" class="org.springframework.jmx.export.assembler.