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.
To 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.
-
Configure the user and database as described in Configuring
the User and Database for Persistence in Using the BPEL Designer and Service Engine.
-
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.
-
For each JDBC resource you created, return to the JDBC
Resources page on the GlassFish Admin Console and do the following:
-
Select the JDBC resource from the list, and then click
the Target tab.
-
Click Manage Targets.
-
Under Available Targets, select the cluster and click
Add.
-
Click OK.
-
In the Targets table, select the cluster and then click
Enable.
-
To automatically create the database tables, do the following:
-
In the NetBeans Services window, expand Servers > GlassFish
V2 > JBI > Service Engines.
-
Right-click sun-bpel-engine, and then select Start.
-
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.
-
Stop and start sun-bpel-engine.
-
Shutdown sun-bpel-engine.