Accessing JMX for Oracle WebLogic 11g
- by Anthony Shorten
In Oracle Utilities Application Framework V4, we use the latest Oracle WebLogic release (11g). The instructions below illustrate a way of allowing a console like jconsole to remotely monitor and manage Oracle WebLogic using the JMX Mbeans.
Typically management of Oracle WebLogic is done from Oracle Enterprise Manager or the Oracle Weblogic console application but you can also use JMX.
To access the JMX capability for Oracle WebLogic 11g, for an Oracle Utilities Application Framework based product, using a JMX console (such as jconsole) the following process needs to be performed:
Enable the JMX Management Server in the Oracle WebLogic console at splapp - Configuration - General - Advanced Settings option. Enable both Compatibility Mbean Server Enabled and Management EJB Enabled (this enables the legacy and new JMX interface). Save the changes This change will require a restart.
In the startup of the Oracle WebLogic server in the $SPLSYSTEMLOGS/myserver.log (or %SPLESYSTEMLOGS%\myserver.log on Windows) you will see the BEA-149512 message indicating the Mbean servers have been started. The message will indicate the JMX URL that can be used to access the JMX Mbeans. The URL is in the format:
service:jmx:iiop://host:port/jndi/mbeanserver
where:
host - Oracle WebLogic host name
port - Oracle WebLogic port number
mbeanserver - Mbean Server to access. Valid Values:
weblogic.management.mbeanservers.runtime
weblogic.management.mbeanservers.edit
weblogic.management.mbeanservers.domainruntime
For illustrative purposes we will use the domainruntime Mbean.
Ensure that you execute the splenviron[.sh] utility to set the appropriate environment variables for the desired environment.
Execute the following jconsole command to initiate the connection to the JMX Mbean server
Windows:
jconsole -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%WL_HOME%\server\lib\wljmxclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote
Linux/Unix
jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar;$WL_HOME/server/lib/wljmxclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote
You will see a New Connection Dialog. Specify the URL from the previous steps into the Remote process (i.,e. service:jmx:iiop...). The credentials are the credentials specified for the Oracle WebLogic console.
You are now able to view the JMX classes available.
Here is an example from my demonstration machine:
Refer to the Oracle WebLogic Mbean documentation to understand the output.