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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...