Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components
Close Print View
Reference: Using Oracle and Other Databases for Alert Persistence
 

Classic Java CAPS

Java CAPS Management and Monitoring APIs

Java CAPS Management Client

JavaDocs

Targets

Getting Started Using APIs

To Start Using APIs to Create Applications

Connecting to the Server Through APIs

Connection Type Definition

CAPSManagementClientFactory Definition

The Alert Management API

Support for Databases

AlertConfigurationService

AlertNotificationService

Services -- JavaCAPSManagementAPI

Administration Service

Runtime Management Service

Configuration Service

Deployment Service

Installation Service

Performance Measurement Service

Alert Management Service

Alert Administration Service

Alert Notification Service

Alert Configuration Service

JMS Management Service

Log Management Service

BPEL Management Service

Master Data Management (MDM) Service

Sun Adapters Management Service

Target Option Behavior for the Management Client

Writing Java Code to Access APIs Using Java Code Samples

Setting Up Databases

To Set Up a Database Using Enterprise Manager

To Set Up a Database Using a Scripting Utility

Using Oracle and Other Databases for Alert Persistence

To Set Up an Oracle Database for Alert Persistence

Oracle Script Examples

Setting Up Scripting Engines

Downloading, Installing, and Setting Up A Scripting Environment

Setting Up a Scripting Environment to Invoke Java CAPS Management and Monitoring APIs

To Modify the Environment Variables in env.bat

Using a Scripting Language to Exercise the Java CAPS Management and Monitoring APIs

Exercising the Administration Service

Exercising the Configuration Service

Exercising the Deployment Service

Exercising the Installation Service

Exercising the Runtime Management Service

Exercising the JMS Management Service

Exercising the BPEL Management Service

Exercising the HTTP Administration Service

Exercising the Notification Service

JRuby Integrated into NetBeans IDE

Java CAPS JMS Reference

WebLogic Server Components

Understanding Sun Master Index Configuration Options (Repository)

Understanding Sun Master Index Processing (Repository)

Understanding the Sun Match Engine

Understanding the Business Rules Method Palette

About Application Adapters

About Communication Adapters

About Database Adapters

About Web Server Adapters

What's New in the Sun TCP/IP HL7 Adapter

Java EE Based Components

Sun Master Data Management Suite Primer

Understanding Sun Master Index Configuration Options

Understanding the Master Index Match Engine

Understanding the Master Index Standardization Engine

United States Patient Solution Using MDM

Australia Patient Solution Using MDM

United Kingdom Patient Solution Using MDM

Using Oracle and Other Databases for Alert Persistence

Oracle, and the other supported databases besides Derby, are also capable performing alert persistence. However, there a number of changes you must perform to get it to work.

Note - If you plan to use Oracle instead of Derby for alert persistence, make sure you read this topic.

To Set Up an Oracle Database for Alert Persistence

  1. Modify the eventmanagement.properties file under appserver/domains/domain1/jbi/config.
    1. Modify the DatabaseType to ORACLE.
    2. Change the AlertTablename to EMHOSTNAMEVistastccom8080.

      Note - This step is required as the default name, EVENTMANAGEMENTHOSTNAMEistastccom8080, exceeded Oracle's 30-character limit for table names.

    3. Change the DBJndiName to OracleXPDB.

      Note - You create this in the Admin Console; this is noted in step 2.

    4. Change PersistenceEnbled to true.
    5. Using Enterprise Manager, set the values for DatabaseType, DBJndiName, and PersistenceEnabled in the normal Alert Management Config Agent.

      Note - The database scripts should probably be run before enabling persistence. The table name must be changed in the file manually.

  2. Create the JDBC connection pool and resource in the Sun Java System Application Server Admin Console.
    1. Add the location of classes12.zip to the classpath, JVM Settings->Path Settings->Classpath Suffix, and then restart the domain.

      Note - This is needed to get the datasource for Oracle.

    2. Create the Connection Pool for Oracle.
      1. Enter a name, such as OracleXPPool, but this name can be your choice.
      2. Select javax.sql.DataSource for the Resource Type.
      3. Select Oracle for the Database Vendor.
      4. Set the appropriate properties:
        1. User: eventdb_user
        2. DatabaseName: orcl

          Note - This and other database specific configurations may change depending on how you configured the Oracle database.

        3. Password: eventdb_user
        4. ServerName: hostname

          Note - This is the server where the database is running.

        5. PortNumber: 1521
        6. URL: jdbc:oracle:thin:@hostname:1521:orcl

          Caution - This URL may actually override the other settings; it should match the other settings.

      5. Create the JDBC Resource.
        1. Enter a JNDI Name, for example OracleXPDB.

          Note - This should match what is set in the Alert Management Config Agent/eventmanagement.properties file mentioned above.

        2. Select the appropriate Pool Name; in our example we used OracleXPPool.
  3. Create the user, tables, etc. needed for alert persistence and journaling manually.

    Note - This is automatically done for Derby.

    There are database scripts that are packaged in the jbi_rt.jar file under appserver/jbi/lib. However there are some errors, so you need to be correct these scripts manually.

    • The example scripts have been modified to work with an Oracle 10 GB database; see Oracle Script Examples.

    • Run the create_event_store_user.sql and create_event_store_schema.sql scripts, in that order, with the system (admin) user.

    • Corrections made in this example:

      • Set the absolute path to tablespace data files (database installation dependent)

      • Modify the command to match Business Process persistence

      • Comment out the second data file

      • Move the comments

      • Fix the table name references to match user schema and table name, which were set above in eventmanagement.properties

      • Fix the column reference; that is, change the second column name from event_timestamp to timestamp

      • Change the datatype from timestamp to decimal

      • Fix the reference for sequence