Setting up the ReportsApplication

The recipes used in this chapter are built around a ReportsApplication. To keep the demonstration of timers simple, a SystemReportManager class is created which issues reports detailing the memory usage of the current JVM. The actual report generated is secondary to learning how to create and use timers. Reporting on JVM memory usage is easy and simple, and its use does not distract from the explanation of timers.

Getting ready

We will create a Java 6 EE application called ReportsApplication. As usual, we will use a packt package to hold our classes and a servlet package to hold the servlet used to drive the application. We will add a simple SystemReportManager class to generate reports and a ReportsServlet to ...

Get EJB 3.1 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.