A Basic MBean Example

To better understand how WebLogic uses JMX, it will be helpful to first develop our own simple Standard MBean example and see how it works. The main steps for creating a Standard MBean are as follows:

1.
Write the standard MBean interface.
2.
Write a class that implements the standard MBean interface. (If you want to turn some of your existing classes into MBeans, you would write a Standard MBean interface for the class and then have your class implement it.)
3.
Create a JMX agent to register the MBean and manage it.

Let's go over the steps in greater detail with the use of an example. Suppose that we have a climate control application, and we also have a simple class whose only purpose is to set and get the temperature as ...

Get BEA WebLogic Server™ 8.1 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.