If you will provide a Setter method like "
setId" then "Id" will be treated as an Attribute of your MBean.
Same way is you provide a Getter like "
getServiceId" then "ServiceId" will be considered as an Attribute to your MBean. So if you just want to provide methods (operations) inside your MBean then do not prefix any method with "set" or "get" keywords.
Thanks for reply, but I think It was working with jboss 5.x. and is it as per specifications?
The Java class of a standard MBean exposes the resource to be managed directly
through its attributes and operations. Attributes are internal entities that are exposed
through getter and setter methods. Operations are the other methods of the class
that are available to managers. All these methods are defined statically in the MBean
interface and are visible to an agent through introspection. This is the most
straightforward way of making a new resource manageable.