Below are the steps required to set up the TimesTen example: create the database, add schema and data, and deploy and undeploy the example service.

Creating a database

The resource adaptor configuration in the example expects two DSNs to be available: mappingsCS1 and mappingsCS2. For the TimesTen Client, this could be a working configuration:

[ODBC Data Sources]
mappingsCS1=TimesTen 11.2.1 Client Driver
mappingsCS2=TimesTen 11.2.1 Client Driver



Each server would then also need a DSN named mappings.

The server data sources need a user created. The examples use a user ID of appuser with password appuser (can be changed in

Schema and data

The SQL below must be applied to the specified data sources to create the table, insert a row into it, and define the test procedure used in the example.

DROP TABLE mappings;

CREATE TABLE mappings (
  short_code VARCHAR(10) PRIMARY KEY,
  long_code VARCHAR(64) NOT NULL

INSERT INTO mappings (short_code, long_code) VALUES ('0000', '11111111111');

    p_concat OUT mappings.long_code%TYPE,
    p_short_code IN mappings.short_code%TYPE,
    p_prefix IN mappings.long_code%TYPE)
    SELECT concat(p_prefix, long_code)
      INTO p_concat
      FROM mappings
     WHERE short_code = p_short_code;

    UPDATE mappings
       SET long_code = p_concat
     WHERE short_code = p_short_code;

Deploying the example service

Before starting Rhino, LD_LIBRARY_PATH needs to be set as described in the last section of Deploying the resource adaptor.

Then, timesten.jdbc.dir and client.home must be set in the and examples/ files respectively.

The build target deploy-timesten-example of examples/ will deploy the DB Query RA, the Example RA, and the example service.

Undeploying the example service

The build target undeploy-timesten-example of examples/ will undeploy the example service, the DDB Query RA, and the Example RA.

Warning After undeploying the TimesTen version of the RA, a Rhino restart is needed before it can be deployed again. This is because it uses the TimesTen native library.
Previous page