Buttso Does the BLOG Thing :

 

Steve Button

Subscribe to "Buttso Does the BLOG Thing" in Radio UserLand.

 

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

JMX Support in OC4J 10.0.3

One area that has been of interest to a lot of people is JMX and since we now have a distribution available which includes JMX, I thought I'd make some notes about where we are at, and what's available in the current developer preview.

We are currently using the Sun JMX reference implementation as the JMX server in the available zip file. We have implemented the majority of the managed beans specified in JSR77, and we also provide an implementation of JSR88, which is the J2EE standard deployment API.

To have a look around at the OC4J MBeans you can use prototype MBean browser (called the OC4J JMX Console) we have included.

The JMX Console is available as alink from the OC4J Admin page. The URL to access the admin page is http://host:port/adminoc4j, where the default port of OC4J is 8888. The admin page has protected access, so you will need to provide valid logon details in order to access the application.

The admin page (and the JMX Console) is protected by default using the physical "administrators" role, so your administrator logon will enable you to access the console.

Once you have opened the URL, you will see the admin page. This page lets you perform a number of management operations on OC4J such as deployment of applications and modules, creation of datasources, etc.

The very top link on the page is for the JMX Console, which when clicked, will display the list of MBeans that are running within the OC4J instance.



Here's what the JMX Console looks like when you fire it up:



Browsing through the list of MBeans displayed, you will see all the managed beans that are running in OC4J, implementing JSR77 plus the other OC4J specific MBeans. Clicking on one of the MBean links will display the details about that specific MBean.

Having JMX support and associated MBeans for each of the areas of the product allows us to support dynamic configuration changes made via the MBeans themselves. This doesn't mean that each and every configuration change will be dynamic, but the infrastructure is there to allow it to happen if needed.

To see a simple example of this dynamic configuration change in action, find the link that looks like

oc4j:j2eeType=ThreadPool,name=ApplicationServerThreadPool_0,JVM=single,J2EEServer=standalone

This is the MBean which allows the management of the OC4J thread pool.

Clicking on this link will display a drop-box which lists the set of attributes this MBean exposes (ie it's settings). Selecting any of the attributes from this list and pressing the "Get Details" button will let you work with the chosen attribute. Using this, you can quite easily find out what the current settings of the threadpool are, such as minPoolSize, maxPoolSize, current pool size, etc.

The OC4J MBeans are all self describing, so the JMX Console can provide a description of what an attribute is, as shown below:

PoolSize

Description : The current number of threads in the pool  
MBean : oc4j:j2eeType=ThreadPool,name=ApplicationServerThreadPool_0,JVM=single,J2EEServer=standalone
Type : long
Access : Read Only


To see the dynamic configuration change in effect, load the 'debug' attribute. The debug attribute tells the thread pool whether or not to spit out debugging information. Clicking on the 'get value' button, you should see the current value set to 'false'. Now enter 'true' into the 'Set To' field and press the 'Set value' button.

Now go back to the console where OC4J was started, and you should see debug messages from the thead pool now being emitted.

04/02/09 11:37:55 1076288875554:ThrP[20] ThrQ[0]
04/02/09 11:37:56 1076288876556:ThrP[20] ThrQ[0]
04/02/09 11:37:57 1076288877587:ThrP[20] ThrQ[0]

The debug setting change for the thread pool is put into effect straight away and it's also written into the underlying configuration file (j2ee/home/config/server.xml -- global-thread-pool tag) so it's persisted across container restarts.

So, a quick intro to JMX in OC4J. Have a click around and see what else you can find.



© Copyright 2004 buttso.
Last update: 2/19/2004; 4:01:34 PM.

Click here to visit the Radio UserLand website.