Sample JEE Application: Contoso Order Service

To get a better understanding of how to use the SCOM 2012 Add-on of the JEE Application Server feature in future blog posts, it is going to be necessary to have an application to talk about (and write Management Packs (MPs) against). For that reason, I am going to introduce a simple application dubbed the Contoso Order Service. For this particular case, the application developed is a RESTful-like servlet representing an online ordering system.


To fulfill the demo needs, this application has a few URLs that can be hit to modify/set availability and performance data to exercises different features of the customer management pack.

When the servlet deploys, a ServletContextListener deploys Availability and Performance MBeans to the JVM’s MBean store. The ServletContextListener also unregisters the MBeans when the application stops or un-deploys.

The Servlet itself does not do much, but it does offer several URLs for tweaking the Availability and Performance MBeans.

Availability MBean

The Availability MBean provides several stock pieces of metadata describing the online ordering system:

  • Department
  • IsRunning
  • Organization Code
  • Start Time
  • Version

The IsRunning parameter is set to false when the application deploys.  The IsRunning parameter can be modified by a HTTP GET of the following URLs:

Performance MBean

The Performance MBean provides three statistics:

  • Average Transaction Time
  • Faults For Interval
  • Transactions For Interval


These are integers and are randomly generated for each query. The MBean may be configured to increase a baseline number so that the performance metrics will exceed a given threshold. The baseline can be modified by a HTTP GET of the following URLs:

Comments (2)

  1. As far as what/where to deploy, in the ZIP folder there is a target directory that has both a WAR and an EAR file.  The application within each is the same.  The application works on all supported application servers.  It is a very simple application that contains a servlet and register some MBeans when the servlet deploys.

    In the target directory there is a WAR file and an EAR file.

    • The WAR file is meant for the Tomcat deployments (all versions).

    • The EAR file is meant for JBoss, WebSphere, and WebLogic (all versions).

Skip to main content