The Alerts module uses XML file persistence manager by default, but you can migrate to a database persistence manager.
These instructions assume you have already created a WebSphere Dashboard Framework project, enabled alerts for the project, and deployed the project to the Portal server.
- Create a database (with a name such as AlertsDB).
- Create Alerts Module tables using the appropriate SQL file in the folder "WEB-INF\solutions\alerting\db_persistence". There are three SQL files in this folder for DB/2, Oracle, and SQL Server.
For example, if you are using DB/2, use the db2_alerting_tables.sql file.
- Create a JDBC data source in the WebSphere Administrative Console. Give the data source a name like "jdbc/AlertsDBDS". The schema in this data source must be the same as the schema defined for the Alerts module tables. The Portal server may need to be restarted for the new data source to take effect.
- Open the override.properties file in a text editor (located in the folder "WEB-INF\config"). If the file does not exist, create it.
- Edit the property file with the following values. Each property should be entered on one continuous line.
a. Activate the database persistence manager for alerts:
bowstreet.solutions.alerting.persistenceManager.implementation=com.bowstreet.solutions.alerting.impl.database.DatabasePersistenceManager
b. Use one of these lines to identify your database type:
bowstreet.solutions.alerting.databasePersistenceManager.idFactoryClass=com.bowstreet.solutions.alerting.impl.database.DB2InstanceIDFactory
bowstreet.solutions.alerting.databasePersistenceManager.idFactoryClass=com.bowstreet.solutions.alerting.impl.database.OracleInstanceIDFactory
bowstreet.solutions.alerting.databasePersistenceManager.idFactoryClass=com.bowstreet.solutions.alerting.impl.database.SQLServerInstanceIDFactory
c. Identify your data source (for example, jdbc/v5/dashboard):
bowstreet.solutions.alerting.databasePersistenceManager.dataSourceName=datasource_name
d. (Optional) Add these lines to enable caching for better performance:
bowstreet.solutions.alerting.databasePersistenceManager.enableCaching=true
bowstreet.solutions.alerting.databasePersistenceManager.cacheTimeoutInterval=60
- Save the property file.
If you set the project up to deploy automatically, the changes will be deployed to the server directory. Restart the Portal server or the current Web application to take advantage of the new properties. If the project does not deploy automatically, rebuild the Portal WAR file to incorporate the new properties and deploy the application.
- Place the ImportDefinitions portlet on the page and use it to import all the definitions from XML to the database.
|