com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

JMX-Based Monitoring

Java Management Extensions (JMX) is a technology that lets you implement management interfaces for Java applications. A management interface, as defined by JMX, is composed of named objects called MBeans (Management Beans). MBeans are registered with a name (an ObjectName) in an MBeanServer. To manage a resource or many resource in your application, write an MBean that defines its management interface. Then register that MBean in your MBeanServer. The content of the MBeanServer can then be exposed through various protocols, implemented by protocol connectors, or protocol adaptors.

JMX is enabled in WSO2 Carbon by default. Therefore, the WSO2 Application Server facilitates JMX-based monitoring. Some of the monitoring and management capabilities available in the Application Server's Management Console are also exposed via JMX.

You can change the JMX configuration by editing the jmx.xml file, which is inside the <BPS_HOME>/repository/conf/etc directory. You can configure JMX ports, RMIRegistryPort and RMIServerPort from the "Ports" section of the carbon.xml, which is in the <BPS_HOME>/repository/conf directory.

<JMX>
     <!--The port RMI registry is exposed-->
     <RMIRegistryPort>9999</RMIRegistryPort>
     <!--The port RMI server should be exposed-->
     <RMIServerPort>11111</RMIServerPort>
</JMX>

However, to enable remote access, the JMX server should be unbound from localhost and bound to a remotely accessible IP address. This can be done by modifying the <BPS_HOME>/repository/conf/advanced/jmx.xml file. Modify this to the preferred IP address.

<JMX xmlns="http://wso2.org/projects/carbon/jmx.xml">
    <StartRMIServer>true</StartRMIServer>
 
    <!-- HostName, or Network interface to which this RMI server should be bound -->
    <HostName>localhost</HostName>
 
    <!--  ${Ports.JMX.RMIRegistryPort} is defined in the Ports section of the carbon.xml-->
    <RMIRegistryPort>${Ports.JMX.RMIRegistryPort}</RMIRegistryPort>
 
    <!--  ${Ports.JMX.RMIRegistryPort} is defined in the Ports section of the carbon.xml-->
    <RMIServerPort>${Ports.JMX.RMIServerPort}</RMIServerPort>
</JMX>

If JMX is enabled, when the server starts up, it will print the JMX Server URL on the console as follows. 

INFO {org.wso2.carbon.core.init.CarbonServerManager} -  JMX Service URL  : service:jmx:rmi://<your-ip>:11111/jndi/rmi://<your-ip>:9999/jmxrmi

Using 'jconsole' to Manage and Monitor the WSO2 Business Process Server

Jconsole is a JMX-compliant monitoring tool. It comes with the Jave Development Kit (JDK) 1.5 and newer versions and can be found in the <JDK_HOME>/bin directory.

You can start the tool by simply typing jconsole in a command (shell) prompt from the <JDK_HOME>/bin directory.

Once the console is opened, you can connect to Carbon by providing the following URL as the Remote Process URL. You can type in the default username and password combination admin/admin to login. Note that this is the same administrator account that is used to log into the Application Server's the Management Console. Any user having the admin role can login to JMX.

The "Jave Monitoring & Management Console" opens. The first window you see looks similar to the following:

Click on the "MBeans" tab to see the "org.wso2.carbon" domain, which contains some MBeans as follows:

Instance MBean

Instance MBean is used to monitor instance information about the current instances in BPS.

You can see an attribute named "InstanceInfoFromInstanceId" within instance MBean. This consists of a String array with information about all instances currently resides in BPS.

(tip- to get the content of the information array, double click on it)

You can find the following information about an instance

  • Instace id
  • Process id
  • Status of the instance
  • Started date and time
  • Last activate date and time

Process MBean

Process MBean is used to Monitor processes in BPS.

The Process MBean has the following operations

  • retireProcess - Retire a currently deployed process.
  • activateProcsess- Activate a currently deployed process
  • disableProcess- Disable a currently deployed process.

You can see an attribute named "ProcessStates" within process MBean. This consists of a String array with information about all BPEL processes currently resides in BPS.

(tip- to get the content of the information array, double click on it)

You can find the following information about a currently deployed processes.

  • Process name
  • Version
  • State 

Input format for operations

You need to give the local part of the process name with the version of the process in order to do a task on a particular process. The format should be "local name of the process-version of the process".

As an example if you want to retire "HelloWorld2" process, you need to give the input as HelloWorld2-2.

Like wise you can do other two operations on processes which are already deployed in BPS by using Process MBean operations.

Instance Status Monitor MBean

Process MBean is used to get information about process faliures and instance faliures. In order to get notifications on failures you need to subscribe to notifications.

  1. Click on "Notifications" under InstanceStatusMonitor Mbean.
  2. Click on "Subscribe" in order to subscribe to the notifications.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.