I have doubt about the difference between normal Interface and MBean interface.
public interface TryMBean
{
// method declaration
}
public class Try implements TryMBeans
{
// method definition
}
this looks like a normal interface, but for this we are able to use jConsole to monitor. My doubt is, what is the difference so that we can monitor it, and how to get idea when to use normal interface and when to go for MBean. I am new to JMX.
An MBean
interface is a regular interface. But it's definition follows some conventions, like it's name. The name of an MBean interface is supposed to end with MBean
. Also, it defines its operations and attributes following some rules that are describe in the Standard MBeans documentation
Basically, if you want to create an MBean that can be used with a JMX console, you have to adhere to these rules. There are also other ways to create MBeans more dynamically that follows some other rules, e.g. if you're using Spring JMX, where MBeans can be dynamically generated based on a "regular" interface.