JBossWS - Endpoint management

JBossWS registers MBeans that users can leverage to manage every webservice endpoint. Apart from the obvious start/stop functionalities, they provide valuable information and statistics about messages processed by the endpoints.

 

Getting the information

JBoss ships with a JMX-Console with all the application server MBeans. It is usually available at URL http://localhost:8080/jmx-console. For endpoint management you might be interested in the MBeans belonging to the jboss.ws domain.

The application server also has an applet based web-console which basically has the same data as the JMX-Console plus some advanced features including snapshot graphics.

Of course you can access an MBean programmatically too. Please refer to the JBoss JMX faq for further details; here is a brief code snippet you might want to start from in order to access a ManagedEndpointMBean from the same virtual machine:

try
{
  MBeanServer server = MBeanServerLocator.locate();
  ManagedEndpointMBean mep = (ManagedEndpointMBean)MBeanProxyExt.create(
            ManagedEndpointMBean.class,
            "jboss.ws:context=my-ctx,endpoint=MyEndpoit",
            server);
  ...
}
catch (Exception e)
{
  e.printStackTrace();
}

Metrics

For each deployed endpoint you'll find an org.jboss.wsf.framework.management.ManagedEndpoint MBean providing basic start/stop functionalities and metrics. Calling a stopped endpoint will always result in a SOAP fault message.

The metrics available for each managed endpoint are:

  • Min, max, average and total processing time: processing includes both the WS stack plus application server work and the user business logic
  • Last start and stop time
  • Request, response and fault count

Records

Since 2.0.3

JBossWS features a highly configurable records' collection and management system. Each record is basically composed of a message plus additional information (for example the caller address and the called endpoint operation).

Endpoints can be configured with record processors that are invoked whenever a message flow is detected and records are thus created.

Every deployed endpoint is configured with default record processors. However custom processors as well as record filters can be easily plugged in and managed at any time through JMX. This gives users the chance of performing advanced analysis of the webservice traffic according to their business requirements.

Please refer to the records management page for further details.

Snapshots and threshold monitors

As previously said, the JBoss Web Console has interesting features including snapshots and threshold monitors.

Snapshots allow users to record changes of a given MBean attribute within a defined time interval. Data are sampled at a given rate and may be plotted to graphs with a few clicks. Snapshots are listed in the Web console and can be created simply browsing to http://localhost:8080/web-console/createSnapshot.jsp .

Threshold monitors allow users to be notified whenever a given MBean attribute exceed a certain range of values. The threshold monitor's creation and management processes are similar to those mentioned above for the snapshots. Simply browse to http://localhost:8080/web-console/createThresholdMonitor.jsp .

Speaking of WS availability and SLA, this all becomes interesting because users can monitor and take snapshots of critical attributes like the average/max processing time of a managed endpoint. Moreover, advanced analysis can be performed leveraging ad-hoc attributes of custom record processors.