Application Overview:
--------------------
This application watch alarm messages generated asynchronously via
JMS. It involves the different technics used in JOnAS:
- Entity Bean for AlarmRecord, persistent in a DataBase
- Session Bean to allow clients to visualize alarm received
- Message Driven Bean to catch Alarms
- JMS to use a topic where Alarms are sent and received
- a service included in EJBServer (AlarmManager)
- tomcat or jetty (for JSP pages and servlets)
- security
Alarm messages are formed of (severity 1-3, from, reason).

Directory structure:
--------------------
etc/web.xml	  application description
web/		  JSPs, images, html files.
beans/		  beans and service, to be loaded in JOnAS.
client/		  client java program generating alarms and using JMS.
          this alarm generator is obsolete.

Compiling this test:
-------------------

Use the Ant 1.5 build tool:
  ant install


Running this test:
-----------------
Prerequisite:
   - You must have installed Tomcat4.1.x or Jetty 4.2.x
   - You must have configured a Database.
     The jndi name used in the bean is jdbc_1.
     See $JONAS_ROOT/doc/GettingStarted.html for more information.


1) run JOnAS server
   The jonas.properties file must specify the following services :
      - web service, jms service, ear service
   You also have to add the alarm.ear component in the list of jonas.service.ear.descriptors.

   Note that the AlarmTopic that will be used by this test will be automatically created
   when the message driven bean will be loaded in the container.
    jonas start

2) Load the alarm.ear if you have not added it in the ear service descriptors list
   jonas admin -a alarm.ear

3) Generate alarms
   The easiest way is to use the link on the first html page that will run
   a servlet that will generate customized alarms.

4) Look at http://$HOSTNAME:<your_port_number>/alarm/index.html
   to start using the web application.

5) Stop the jonas server
    jonas stop

Known bugs or Limitations:
--------------------------
1.
Sending many alarm messages concurrently with InstantDB as database will
not work (deadlock leading to transaction timeout, and delay on servlet
display) This can occur with every database that cannot handle multithreading
properly.

2.
The display pages are not automatically refreshed when a new alarm is
arrived. To be done in a future version.

3.
Filter names cannot contain "space" characters.

4.
The first time you run this application, the table will be created in the
database. An error message will be printed by JOnAS because it tries
to drop the table, but it does not exist. Ignore it.
