As YAWL uses hibernate as persistence layer it supports every database that Hibernate supports. (see here) All you need to do is to configure the database in the hibernate.properties file of the three web applications "resourceService", "yawl" and "workletService". This is briefly explained in the YAWL user manual section 2.4.4. In the following sections we provide detailed information to get YAWL working with different database management systems.
Regardless the database you'd like to use, there is one (since YAWL 3) configuration file you have to adjust:
The YAWL4Study edition is pre-configured to use the embedded database Apache Derby. Although this database provides full support for YAWL it is generally not recommended to be used in a production system. For development or evaluation use it is sufficient. The database is located in the directory \engine\databases of your YAWL4Study installation. Details on building the correct connection url for Apache Derby can be found in the Derby documentation.
## Apache Derby hibernate.dialect=org.hibernate.dialect.DerbyDialect hibernate.connection.url=jdbc:derby://localhost/C:/Users/UserXY/YAWL4Study-2.2.01/engine/databases/yawldb;create=true hibernate.connection.driver_class=org.apache.derby.jdbc.ClientDriver
PostgreSQL is the default database of the YAWL enterprise edition. Therefore the easiest way to use PostgreSQL is to install the enterprise edition of YAWL and you will be asked for details about your PostgreSQL server during installation. But if you already installed YAWL4Study, you have to adjust your hibernate.properties to the following configuration. Details on building the correct connection url for PostgreSQL can be found in the PostgreSQL documentation.
## PostgreSQL hibernate.dialect org.hibernate.dialect.PostgreSQLDialect hibernate.connection.driver_class org.postgresql.Driver hibernate.connection.url jdbc:postgresql:yawl hibernate.connection.username yawl hibernate.connection.password yawl
To use MySQL you should install the YAWL enterprise edition, as MySQL is a configuration option during the installation. If you'd like to switch to MySQL later on, then adjust the hibernate.properties files as follows and add the correct MySQL JDBC Driver to the lib directory of YAWLs Apache Tomcat. Details on building the correct connection url for MySQL can be found in the MySQL documentation. You may want to choose the MySQL5InnoDBDialect instead of the usual MySQlDialect if you want YAWL to generate InnoDB tables. (Read more about InnoDB)
MySQL JDBC Driver:
- Download JDBC Driver from http://dev.mysql.com/downloads/connector/j/
- Copy mysql-connector-java-5.x.xx-bin.jar to \engine\apache-tomcat-6.0.18\lib
## MySQL #hibernate.dialect org.hibernate.dialect.MySQL5InnoDBDialect hibernate.dialect org.hibernate.dialect.MySQLDialect hibernate.connection.driver_class com.mysql.jdbc.Driver hibernate.connection.url jdbc:mysql:///yawl hibernate.connection.username root hibernate.connection.password root
MSSQL (SQL Server 2005/2008)
To use MSSQL you need to adjust the hibernate.properties files as follow and add the correct MSSQL JDBC Driver to the lib directory of YAWLs Apache Tomcat. Please note, the Microsoft JDBC Driver is not Open Source and there are other implementations available. (For Example jDTS) Details on building the correct connection url for MSSQL can be found in the MSSQL documentation.
MSSQL JDBC Driver:
- Download JDBC Driver from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21599
- Copy sqljdbc4.jar to \engine\apache-tomcat-6.0.18\lib
## MS SQL Server hibernate.connection.driver_class com.microsoft.sqlserver.jdbc.SQLServerDriver hibernate.connection.url jdbc:sqlserver://localhost\SQLEXPRESS;databaseName=yawl;user=yawl;password=yawl;SelectMethod=cursor hibernate.dialect org.hibernate.dialect.SQLServerDialect hibernate.connection.username yawl hibernate.connection.password yawl