Skip navigation.
Downloads | Product Documentation | Support

Developing Manageable Applications with JMX

# Accessing Custom MBeans

Besides programmatic JMX access to your custom MBeans, you can use any JMX-compliant management system to access your MBeans. For information, see What Management Services Have BEA Partners Developed? and the Sun Developer Network Web site, which provides links to books, white papers, and other information on JMX: http://java.sun.com/products/JavaManagement/.

The following sections describe additional ways to access your custom MBeans:

- Accessing Custom MBeans from JConsole
- Accessing Custom MBeans from WebLogic Scripting Tool
- Accessing Custom MBeans from an Administration Console Extension

# Accessing Custom MBeans from JConsole

The JDK includes JConsole, a Swing-based JMX client that you can use to browse MBeans. You can browse the MBeans in any WebLogic Server MBean server and in the JVM platform MBean server. Sun recommends that you use JConsole only in a development environment; it consumes significant amounts of resources. See Using JConsole to Monitor Applications at http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html.

To access custom MBeans from JConsole:

1. Enable the IIOP protocol for the WebLogic Server instance that hosts your MBeans. Configure the default IIOP user to be a WebLogic Server user with Administrator privileges.

See Enable and Configure IIOP in Administration Console Online Help.

2. From a command prompt, make sure that JDK 1.5 or its equivalent is on the path.
3. In the command prompt, enter the following command: `jconsole`
4. If your custom MBeans are registered in the JVM platform MBean server (or if you have configured the WebLogic Server Runtime MBean Server to be the JVM platform MBean server):

1. In the JConsole window, select Connection > New Connection.
2. In the Connect to Agent window, select the Local tab and click Connect.

5. If your custom MBeans are registered in the WebLogic Server Runtime MBean Server, and if you have not configured the Runtime MBean Server to be the platform MBean server:

1. In the JConsole window, select Connection > New Connection.
2. In the Connect to Agent window, select the Advanced tab.
3. On the Advanced tab, in the JMX URL box, enter:

`service:jmx:rmi:///jndi/iiop://``host:port``/weblogic.management.mbeanservers.runtime`

where `host:port` is the host name and port of the WebLogic Server instance that hosts your MBeans.

For example: `service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.runtime`

4. In the User Name and Password boxes, enter the default IIOP user name and password.
5. Click Connect.

# Accessing Custom MBeans from WebLogic Scripting Tool

If you register your MBeans in the Runtime MBean Sever, you can use WebLogic Scripting Tool to access your custom MBeans. See Accessing Custom MBeans in WebLogic Scripting Tool.

# Accessing Custom MBeans from an Administration Console Extension

You can extend the WebLogic Server Administration Console by creating Java Server Pages (JSPs) that conform to a specific template. Your JSP can include JMX code that connects to the JVM platform MBean server or the WebLogic Server Runtime MBean Server and looks up your MBeans.

For more information, see Extending the Administration Console.