VMware Cloud Community
spss
Contributor
Contributor

Hq JMX plugin

Hi,
I have a simple java program, with a get/set and reset.
public class Simple{

public String getState() {

return state;

}

public void setState(String s) {

state = s;

}

public void reset() {

state = "initial state";

}

private String state = "initial state";

}

How do I make the program manageable using jmx?
and,
How dow I write a JMX plugin,control the program through HQ?
My goal is to see the MBean get/set and reset in hypericHQ.
Could you give me an example?
A full example is best.

Thanks
euph
0 Kudos
1 Reply
admin
Immortal
Immortal

I'd suggest you start with Sun's getting started guide on JMX:

http://java.sun.com/developer/technicalArticles/J2SE/jmx.html

Once you get your test bean deployed, follow the HQ JMX plugin documentation. Since your bean only exposes managed operations only the section on control applies:

http://support.hyperic.com/confluence/display/DOCSHQ30/JMX+Plugin#JMXPlugin-Control

-Ryan
0 Kudos