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:
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.