Java CAPS Management and Monitoring APIs

ProcedureTo Set Up a Database Using a Scripting Utility

  1. Start the domain you want to use.

  2. Use the Sun Java System 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.