I am running my webapp in
Tomcat 6.0. I have declared a very simple MBean as follows:
package com.my.gtw;
import org.springframework.jmx.export.annotation.ManagedA ttribute;
import org.springframework.jmx.export.annotation.ManagedR esource;
@ManagedResource(objectName="bean:name=helloWorldJ MX",description="Hello World Managed Bean")
public class HelloWorldJMX {
private
String message;
@ManagedAttribute(defaultValue="hello",description ="Message Attribute")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
My app-config.xml is as follows:
<context:mbean-export />
<bean id="helloWorldMBean"
class="com.my.gtw.HelloWorldJMX"/>
When I run jconsole I do not see my MBean in the MBeans window.
Please help me .... seems to be a slip in configuration from my side.
Thanks in advance.