Photo of the cover of WebSphere Application Server Administration Using Jython

Official companion web site

Overview of WebSphere Application Server MBeans

Most recently modified on 2009-09-16
Available from
Back to home page Back to table of contents page Back to interesting articles page

A Server is composed of services, components, and a process definition. The services and components combined constitute IBM's implementation of Sun's J2EE spec plus some IBM proprietary code. The process definition is the Java virtual machine that conforms to Sun's JVM spec. The services and components will vary from version to version and will also depend on what enhancements to WebSphere Application Server your organization has licensed. Almost always, the services will include a TraceService, a TransportChannelService, a DiagnosticProviderService and many other services. Very often, the components of a Server will include an ApplicationServer and a NamingServer.

IBM uses MBeans to report status and control behavior at every level of its server architecture. There is an MBean associated with the Java virtual machine. That MBean is the JVM type MBean. There is another MBean associated with IBM's implementation of Sun's J2EE spec. That MBean is the Server type MBean. There is another MBean associated with the trace service. Yet another MBean is associated with the web container. There are MBeans associated with many diagnostic providers. It is not unusual to find over 200 MBeans dedicated to different parts of a WAS server. If you compare the illustration with this text, you can see that IBM has provided MBeans at every layer of its architecture. This extremely detailed level of instrumentation is one of the major features WebSphere Application Server brings to enterprise computing.

Every MBean has some standard parts. There are attributes, operations and notifications. Some attributes are read only. Others can be modified. You can find accurate, up to the minute information about any MBean fairly easily. Here is one of the several ways to get information about the MBeans in your installation of WebSphere Application Server.

raw = AdminControl.queryNames( '*' ) Get all the names of all the MBeans currently started in your entire cell. All those names will come to you mushed together in one long string. The individual names are separated by newline characters.
listOfMBeans = raw.splitlines() As long as you got at least one MBean name, this code separates each individual name into its own element in a list.
print len( listOfMBeans ) Just in case you were wondering how many MBeans there are in your cell.
print Help.all( listOfMBeans[0] ) Feel free to use any positive number that is less than the number of elements in your list.

Another way to find documentation is to look in the IBM InfoCenter. You can search for information in the IBM InfoCenter if you know the type of an MBean. As a practical matter, you have to know what type of MBean you are interested in and what server executes that MBean's code if you want to use an MBean. You can learn a lot about an MBean just by looking at its name. Here is an example of an MBean's name.

WebSphere:cell=pongo,name=TraceService, mbeanIdentifier=cells/pongo/nodes/pongo/servers/server1/server.xml#TraceService_1, type=TraceService,node=pongo,process=server1

In real life, that line would be one continuous string on one single line. We broke up the string at the commas to make it easier to read. Notice "type=TraceService" in the MBean name above. If you search the reference section of the IBM Infocenter using "Trace Service MBean" as your search string, you will find the Trace Service MBean Definition Table. Notice "cell=pongo" and "node=pongo" and "process=server1" in the MBean name above. If you have the cell name, the node, name, and the server name, you can reach any server no matter how complex your topology may be. In simpler topologies, you can get by with node name and server name. If you know that there are no duplicate server names in your cell and there is only one cell, you might get by with just the server name. Notice that you get the server name from the process name. The name of an MBean will tell you what type of MBean it is and which server in your cell executes this MBean.

In order to use an MBean, you need to know about the AdminControl scripting object. In particular, you need to know how to find the MBean(s) you want and how to invoke methods of that MBean. (See the other articles in this section.)

See also these related articles:
How to Select an MBean Server MBeans MBean String Methods Object Instance Methods Object Names Methods

Diagram of the internal parts of a WAS Server

Arthur Kevin McGrath

Bio:

The author is an engineer with the consulting firm, Contract Engineers. He has consulted and lectured extensively since 1987 about the infrastructure that makes electronic commerce possible. His publications include Leading Practices for WebSphere Dynamic Process Edition V6.2 (SG24-7776-00) and Websphere Application Server Administration Using Jython (ISBN 0137009526), the definitive book on WAS scripting.

Photo of the author
Click here to schedule a speaker at your location
Click here to inquire about consulting for your company
Click here to inquire about training for your company