JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Management and Monitoring APIs     Java CAPS Documentation
search filter icon
search icon

Document Information

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

Java CAPS 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 Administration Service in Groovy

Exercising the Configuration Service

Exercising the Configuration Service in Groovy

Exercising the Deployment Service

Exercising the Deployment Service in Groovy

Exercising the Installation Service

Exercising the Installation Service in Groovy

Exercising the Runtime Management Service

Exercising the Runtime Management Service in Groovy

Exercising the JMS Management Service

Exercising the JMS Management Service in Groovy

Exercising the BPEL Management Service

Exercising the BPEL Management Service in Groovy

Exercising the HTTP Administration Service

Exercising the HTTP Administration Service in Groovy

Exercising the Notification Service

Exercising the Notification Service in Groovy

JRuby Integrated into NetBeans IDE

To Create a JRuby Project

Setting Up Databases

Derby is the database that ships with Java CAPS. However, you can set up and use another database. But remember, you are limited to using a database that Java CAPS supports.

As an option to the following procedure, you could replace steps 4-6 by using the Alert Configuration Management API to write a groovy script or small Java utility. For an example of this see the JavaCAPS6/ESB_API_KIT/samples directory, if JavaCAPS6 is the directory where you extracted EM_API_KIT.zip.


Caution

Caution - Remember that the last command you script or program and then execute should be enabling persistence in the specified database. Examples of methods from the Alert Configuration Service API are setPersistenceDataSourceJndiName, getPersistenceDataSourceJndiName, setPersistenceDataBaseType, getPersistenceDataBaseType, and optionally setAlertTableName.

In case the database has a limit to the table name, for example Oracle is limited to 30 characters, the auto-generated table may exceed that limit. Use the Alert Configuration API (SetAlertTableName) to set the table name. Keep in mind that each domain must have unique table name to prevent events from one domain appearing in another domain.


To Set Up a Database Using Enterprise Manager

  1. Start the domain you want to use.
  2. Use the GlassFish Application Server Admin Console or AS Admin command-line utility to set up a connection pool and resource.

    Note - Record the name you assign to the resource name.


    For detailed instructions on how to perform this task see Admin Console online help.

  3. Start the selected database.
  4. Start Enterprise Manager and add the domain you started in step 1.
  5. Launch the Alert Configuration screen (for information see Monitoring Java EE Components).
    1. Select the database type that matches the database you selected.
    2. Enter the JNDI name.

      Note - This is the resource name you created in step 2.


  6. Enable persistence and journaling, and then click Save to commit the changes.

    Note - When you enable persistence you do not have to enable journaling; that is, journaling is optional when persistence is enabled.


To Set Up a Database Using a Scripting Utility

  1. Start the domain you want to use.
  2. Use the GlassFish Application Server Admin Console or AS Admin command-line utility to set up a connection pool and resource.

    Note - Record the name you assign to the resource name.


    For detailed instructions on how to perform this task see Admin Console online help.

  3. Start the selected database.
  4. Write a scripting utility to call the appropriate APIs.
    setPersistenceDataSourceJndiName
    setPersistenceDataBaseType(AlertPersistenceDBType dbtype)
    (Optional) setAlertTableName(String tableName)
    enableAlertsPersistence(Boolean enableJournaling)

    Or, optionally, to execute all of the above APIs, use:

    enableAlertsPersistence(Boolean enableJournaling,String jndiName,
                                        AlertPersistenceDBType dbtype,Long timeToLive,
                                        Long maxCount,AlertLevelType level,
                                        AlertRemovalPolicyType[] policyList,
                                        Boolean enablePolicyExecution,Long interval,
                                        Integer inMemoryCacheSize) throws
    *                                   ManagementRemoteException;

    Note - The order here is not set and can be altered except for enabling persistence, which must be last.