In BPEL component, we are using the in-memory H2 database, this page is trying to give you an example that update it to a Mysql database.
Download the db ANT script zip from here, we use the RiftSaw-3.0.0 Final release (used in SwitchYard 1.0.0.Final) as an example.
- create the folder in $SwitchYard/modules/mysql/main, and then copy the mysql-connector-java-5.1.12.jar (of course, you can choose other versions, but in this page, we are using this version as an example) inside it.
- create a module.xml along with it, the content is like following:
- add the mysql driver and the datasource in standalone.xml file.
Go to the folder that you have extracted for db script zip that we downloaded earlier, let us call it '$dbscript'.
- update the jdbc properties properly in $dbscript/jdbc/mysql.properties. (for other databases, update other $database.properties file)
- update the build.xml file's database property as your target db, (mysql in this case)
- run following command to populate the schema:
you should be able to view the tables via: ant db.show.tables command, and drop the database script through: ant drop.riftsaw.schema
Go to the $SwitchYard/standalone/configuration/standalone.xml, find the BPELComponent, and then overriding following properties:
Then you should be ready to start the SwitchYard, the BPEL component will use the database that you created.