This project contains a small collection of JMX util classes, with focus on wrapping JBoss classes.
Usage is documented in the javadoc.
Create a local proxy around an MBean, the interface must only have the same signatures as the implementing MBean:
Session s = (Session)MBeanProxyFactory.create(Session.class,
"mydomain:name=mySession");
Bind it:
MBeanProxyFactory.rebind("/mySession",s);
Lookit up locally or remote
Context ctx = new InitialContext();
Sesssion s = ctx.lookup("/mySession");
Create a proxy to a remote server
Session s = (Session)MBeanProxyFactory.
create(Session.class,
"mydomain:name=mySession",
"jnp://remote.server.com:1099");