How to configure External Database for WSO2 Business Process Server

WSO2BPS (which allows you to easily deploy and manage complex BPEL services) can be configured to use external database other than the embedded Derby database as it’s persistence storage.

Lets configure External database for BPS

1. Set up and start your database server

WSO2BPS (version – 1.1.1) supports for Mysql ,Oracle and MSSQL Database server.  Latest Vesion of WSO2BPS would support for PostgreSQL.

2. Create a database

3. Extract and Load the BPS schema into that database using provided SQL scripts.

(For example if you are using mysql as your database server, use mysql.sql script located inside ‘WSO2BPS/dbscripts/bps’ directory to create the BPS schema)

use command “mysql -u root -p bps < /home/asela/BPS/wso2bps-1.1.0-SNAPSHO/dbscripts/bps/mysql.sql"
4. Create file named ‘’ inside WSO2BPS/conf directory

5. Add following configuration in file 

Following is sample configuration for Mysql.



in first three lines, data source names, initial context factory and provider port have been configured. Here “bpsds“is used as data source name.

other lines are specified the properties for previously created database. Make sure that your database url, username and password are correctly specified.

6.Open bps.xml file inside WSO2BPS/conf directory and add following parameters

7.Copy the JDBC driver jar file into the ‘WSO2BPS/repository/components/lib’ directory

8.Then start the WSO2BPS server 

if correctly configured You will see following log in WSO2BPS startup..

[2010-05-01 17:49:56,056]  INFO –  DataSources will be registered in the JNDI context with provider PROP_URL : rmi://asela-laptop:2199

[2010-05-01 17:49:59,490]  INFO –  ODE using external DataSource “bpsds”.
[2010-05-01 17:49:59,491]  INFO –  Using DAO Connection Factory class: org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl
[2010-05-01 17:49:59,491]  INFO –  Using DAO Connection Factory class org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl.
[2010-05-01 17:50:00,701]  INFO –  Registering E4X Extension…
[2010-05-01 17:50:00,761]  INFO –  BPEL Server Started.
[2010-05-01 17:50:00,806]  INFO –  Starting OpenJPA 1.1.0
[2010-05-01 17:50:00,914]  INFO –  Using dictionary class “org.apache.openjpa.jdbc.sql.MySQLDictionary”.

Discuss this article on Stack Overflow

Leave a Reply

Your email address will not be published. Required fields are marked *