Configuring Java CAPS JBI Components for GlassFish Clustering

Creating the Clustering Database for the Database Binding Component

When using the Database BC in inbound mode in a clustered environment, you need to create a clustering database to manage the load. This is not required for outbound mode.

ProcedureTo Create the Clustering Database for the Database Binding Component

Before You Begin

Create a database instance in which to create the clustering database tables, and make sure it is running.

  1. Run the following SQL command against the database for each polling table, updating the variables for each table.

    create table owner_polling_table (pkname datatype(size) primary key, instance_name varchar(50), status varchar(30))

    where:

    • polling_table is the name of the polling table

    • pkname is the name of the polling table's primary key

    • datatype is the data type for the primary key

    • size is the length of the primary key column

  2. Run the following command against the database:

    create table instancestate (instanceid varchar(50), lastupdatetime timestamp, tablename varchar(50))

  3. Create and configure a connection pool for the database (for more information, see Chapter 3, JDBC Resources, in Sun GlassFish Enterprise Server 2.1 Administration Guide).

  4. Create and configure a JDBC resource for the database. When you create the JDBC Resource, select the cluster from the Available Targets list and click Add.

    This adds the resource to the cluster and also enables the resource on the cluster.