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.
The Availability MBean provides several stock pieces of metadata describing the online ordering system:
- Organization Code
- Start Time
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:
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: