...
Code Block |
---|
ObjectName hostManagerObjectName = new ObjectName("org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=VHOST-NAME,*") |
This patter pattern will find the MBean we are interested in, regardless whether it has additional properties or not. Using this pattern, you would query the MBeanServer for all names that match, using the queryNames method from the MBeanServerConnection instance (mbsc) for your JMX connection to the server:
...
The ObjectName(s) returned can then be retrieved from the set Set and used as the target ObjectName for invoking operations on via the MBeanServerConnection. One way of doing so is to use the ObjectName and the Interface for the MBean in question to create an MBean Proxy object, which can be used as if it were a normal local java object:
...