The agent is looking for methods matching the MBean attribute naming convention in the interface.
Try setAString and getAString instead of setString and getString .
Thanks for the suggestion. I tried it, but JBoss complained on startup that it could not deploy because "No Attribute found with name: String". According to the JBoss documentation, the setXXX and getXXX methods should refer to whatever the attribute is named in the jboss-service.xml file. So, I believe that if the attribute is name=String, then the methods should be setString and getString.
Afterall, my original SAR did deploy correctly when JBoss was already running. However, when JBoss was started, the 'setString' method was never called. Anyone any idea as to why this is the case?
I suggest not to use java key words. You can't define an attribute named String.
Another thing I am missing is the binding and unbinding of your MBean, but I don't think this has something to do with your problem right now.
Thanks for the suggestion. I tried a different attribute name, but still no luck. I'm now trying the other flavour of Mbean and extending org.jboss.system.ServiceMBeanSupport, and it seems to be working OK so far.
Thanks for your help!