10.5. Running the Alarm Demo

To run the alarm example, you will have to first start the JOnAS server and then run jonas admin. Finally, at the end of the execution you should stop the JOnAS server.

NoteNote
 

The following example assumes that the current folder is $JONAS_ROOT/examples/alarm.

Here is how to proceed:

  1. As root, start the Red Hat Application Server server with the following command:

    /sbin/service jonas start
  2. Run jonas admin with the following arguments:

    jonas admin -a alarm.ear

    NoteNote
     

    The EAR can also be deployed using the web interface:

    1. Click Deployments > Applications (EAR).

      Figure 10-2. Deploy the alarm.ear Example

    2. On the alarm.ear in the Deployable list box on the left side, Click Deploy, then click Apply.

    3. A Confirm dialog appears; click Confirm.

      Figure 10-3. Confirm the alarm.ear Deployment

    4. A Result dialog appears, and the newly deployed EAR is in the list.

      Figure 10-4. Results of the alarm.ear Deployment

    5. If you click Deployments > Applications (EAR) again, alarm.ear will appear in the right list box, which lists the deployed EAR files.

    If you click Application Container, EJB container, or Web Container under Services, you will see alarm.ear in the tree.

  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. Look at http://$HOSTNAME:9000/alarm/index.html to start using the web application. If you are asked for authentication, use Username: tomcat Password: tomcat.

    Running Alarm is simply a matter of following the on-screen instructions: to set alarms, click Click here to generate alarms; to check for alarms, click Filters.

  4. As root, stop the Red Hat Application Server server:

    /sbin/service jonas stop