Glassfish ESB Event Management User Guide - Configuring Alert Persistence
An Alert is a machine-to-person communication that is triggered when a specified condition occurs in a Project component. The condition might represent a problem that must be corrected, or the condition might be informational. An alert may also contain user-requested content such as a reminder (important), a notification (urgent), and ultimately an alert (important and urgent).
The alert persistence architecture includes an external database that you can use to persist alerts. The external database contains one alert table per domain.
By default, alerts are not persisted to the external database. This topic describes how to enable persistence.
Be sure to understand the behavior of the various persistence configurations.
- If persistence is disabled, then alerts are generated and sent to any monitoring instances that are currently running. The monitoring instances can include no more than one instance of Enterprise Manager, as well as any number of clients that use the Alert Management API. For detailed information about the Alert Management API, see Java CAPS Management and Monitoring APIs.
- If persistence is enabled and journaling is disabled, then the alerts are stored temporarily in the external database. The system makes a best effort to send the alerts to all monitoring instances. When the reliable client indicates that it received an alert, the alert is deleted from the database.
- There can be only one reliable client at a time. The most recent client to request reliable delivery becomes the reliable client.
- Enterprise Manager requests reliable delivery when you start the server. Clients that use the Alert Management API can request reliable delivery when they subscribe to the alert notification service.
- Note - If the reliable client is shut down, then there is no reliable client until the next request for reliable delivery is made.
- If persistence and journaling are both enabled, then alerts are stored permanently in the external database. When a client consumes an alert, the alert is not deleted from the database.
You can use any of the following database types for the external database. The Derby database is included with Sun Java System Application Server. The other database types are not included.
If you want to use a database type other Derby, then you must perform additional configuration tasks. For example, you must use JavaTM DataBase Connectivity ("JDBCTM") software and the Java Naming and Directory InterfaceTM ("J.N.D.I.") API to set up access to the database.
For all database types, you must log in to the Configuration Agent and modify the alert notification fields.
To Configure the Alert Table Name (Databases Other Than Derby)
- Open the eventmanagement.properties file in the JavaCAPS-install-dir/appserver/domains/domain-name/jbi/config directory.
- If necessary, change the default value of the AlertTableName property and save the file.
You might need to change the default value to match your organization's naming conventions, or to comply with the database server's character limit for table names.
To Set Up Database Access (Databases Other Than Derby)
- Log in to the Sun Java System Application Server Admin Console.
- Integrate the JDBC driver. You can make the driver accessible to the common class loader or the system class loader. For detailed information about how to integrate a JDBC driver, click Help in the Admin Console.
- In the left pane, expand the Resources node and the JDBC node, and select the Connection Pools node.
- Click New.
- Create the JDBC connection pool. For detailed information about how to create a JDBC connection pool, click Help in the Admin Console.
- In the left pane, select the JDBC Resources node.
- Click New.
- Create the JDBC resource. You will enter the JNDI name of the JDBC resource in a later procedure. Set the pool name to the JDBC connection pool that you just created. For detailed information about how to create a JDBC resource, click Help in the Admin Console.
To Run the Database Scripts (Databases Other Than Derby)
- Open the jbi_rt.jar file in the GlassfishESB-install-dir/glassfish/jbi/lib directory.
- Extract the SQL scripts for your database type.
- If you are using Oracle, then create the tablespace and user that will be used to persist alerts.
- Open the create_event_store_user.sql script and make any changes needed to match your database configuration.
- Run the create_event_store_user.sql script.
- Create the table that will be used to persist alerts.
- Open the create_event_store_schema.sql script and make any changes needed to match your database configuration. Ensure that the table name matches the value in the eventmanagement.properties file.
- Run the create_event_store_schema.sql script.
Using the Alert Configuration Service API to configure the Event Management Framework
The Event Management Framework can be configured by writing code using the Common Management and Monitoring API. For more information, see How do I use the Alert Framework Configuration Service API
Quick Navigation Links
Number of visits: