[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: How to obtain getMessageCounters for a Topic
apwalker
do-not-reply at jboss.com
Sun Sep 16 04:10:11 EDT 2007
BTW the Forum is for Design questions for the JBoss Messaging implementation. Please post these types of questions on the user forums.
That said
You can invoke any JMX MBean remotely by simply looking up the RMIAdaptor in JNDI.
Here's some sample code for doing this
|
| String connectorName="jmx/rmi/RMIAdaptor";
|
| RMIAdaptor server = (RMIAdaptor) new InitialContext().lookup(connectorName);
|
| ObjectName monitorName = new ObjectName("Monitor:name=JBossMonitor");
|
|
|
| Object[] params = {};
|
| String[] signature = {};
|
| String history = (String) server.invoke(monitorName, "history", params, signature);
|
| System.out.println("Invoked JBossMonitor.history:");
|
| System.out.println(history);
|
Check the JBoss Microkernel wiki http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMicrokernel for more info as well as the JBoss AS docs
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084801#4084801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084801
More information about the jboss-dev-forums
mailing list