| The JOnAS Alarm Demo |

## Goal of this demo

This little demo intends to show how you can use JOnAS, Tomcat, and Joram together to get a complete application using EJBs, servlets, html, JSPs, and message driven beans. Moreover, a "service" is run inside EJBServer.

## Running this demo

When you click to access this demo, your web browser should open a dialog box asking you a user ID and a password. Enter tomcat and tomcat.

Click Here to Start the Demo

Notice that the first time, tomcat has to compile each JSP and this may take several seconds.

## Description of the different parts

AlarmGenerator | AlarmGenerator is a servlet that generates alarms by publishing messages on a topic. Once the EJBServer is running, this servlet may be used to feed the Message Driven Bean listening on the topic. Click Here to Generate new Alarms
AlarmService | A JOnAS service, run inside the EJBServer, is used to manage the different alarms received on different devices. This part has not to be an EJB because it used locally in the EJBServer, and has no persistence.
Session bean View | A Session bean is used to provide a remote access to the Alarm Service. Each user will create its own session that will be reached from JSP pages or servlets.
Entity Bean AlarmRecord | When a new alarm type is received, an entity bean is created. If the Alarm is already known, its count is incremented only.
Message Driven Bean | JMS is used to access asynchronously to the service. A Message Driven Bean is used to collect Alarm sent by AlarmGenerator. It will then inform the AlarmService that will process it.

## Architecture