I think the objectName is not correct. You my find the correct names via the java console.
The method server.getMBeanInfo(objectName) should give you some information about the MBean.
I assure you, the object names are COMPLETELY correct. And the MBeanInfo does not provide anything useful. As I stated, this code works as currently implemented, but I don't like doing this:
private static final String jmxPrefix = "jboss.as:subsystem=messaging,hornetq-server=default,jms-topic=";
private static final String topicNames =
You could search the objectNames via queryMBeans:
ObjectName objectName = new ObjectName("jboss.as.expr:subsystem=messaging,hornetq-server=default,core-address=*");
Set<ObjectInstance> mbs = server.queryMBeans(objectName, null);
should give you the objectNames via (ObjectInstance) getObjectName()
Worked as described, THANK YOU!