Configuring Java CAPS JBI Components for GlassFish Clustering

Setting Up the BPEL Database

In order to use the BPEL SE in a clustered environment, you need to create a database, and then create and configure two connection pools and two data sources (to handle both XA and non-XA activities). All engines in the cluster must be configured to use this database. The database should be highly available because a database failure constitutes a single point of failure in the cluster. Automatic database, connection pool, and data source creation is not available from the clustered instances.


Tip –

If you already created the database tables, connection pools, and JDBC resources, you can re-use them for the cluster instances by just changing the target for the JDBC resources from the default server to your cluster (described in step 3 below).


For more information about creating connection pools and JDBC resources, see Chapter 3, JDBC Resources, in Sun GlassFish Enterprise Server 2.1 Administration Guide.

ProcedureTo Set Up the BPEL Database

Before You Begin

If you are using an Oracle database, copy the driver file (ojdbc14.jar) from your Oracle installation to GlassFish_Home/glassfish/lib, and then stop and restart the GlassFish server.

  1. Configure the user and database as described in Configuring the User and Database for Persistence in Using the BPEL Designer and Service Engine.

  2. Create one XA connection pool and JDBC resource and one non-XA connection pool and JDBC resource.

    This is described in Creating an XA Connection Pool and a JDBC Resource in Using the BPEL Designer and Service Engine and Creating a Non-XA Connection Pool and JDBC Resource in Using the BPEL Designer and Service Engine.

  3. For each JDBC resource you created, return to the JDBC Resources page on the GlassFish Admin Console and do the following:

    1. Select the JDBC resource from the list, and then click the Target tab.

    2. Click Manage Targets.

    3. Under Available Targets, select the cluster and click Add.

    4. Click OK.

    5. In the Targets table, select the cluster and then click Enable.

  4. To automatically create the database tables, do the following:

    1. In the NetBeans Services window, expand Servers > GlassFish V2 > JBI > Service Engines.

    2. Right-click sun-bpel-engine, and then select Start.

    3. On the Properties window, enable persistence and update the names of the XA and non-XA data source fields to match the JDBC resources you created above.

    4. Stop and start sun-bpel-engine.

    5. Shutdown sun-bpel-engine.