Link to Your Bedework Databases

Copy and edit the bedework-server-ds.xml files to connect Bedework to your database

<quickstart>/bedework/config/datasources contains set of sample datasource configurations.

In <quickstart>/jboss-5.1.0.GA/server/default/bwdeploy/ remove the bedework*-ds.xml files and replace them with the files in <quickstart>/bedework/config/datasources/<your-db>/

You need to copy and edit these configuration files

  1. bedework-card-ds.xml: connection information for the Bedework CardDAV data source
  2. bedework-ds.xml: connection information for the Bedework calendar server data source
  3. bedework-eventreg-ds.xml: connection information for the Bedework event registration system data source
  4. bedework-synch-ds.xml: connection information for the Bedework synchronization server data source

In each case, within the <datasource> stanza:

  1. edit <connection-url>  to set the database host, port number, and database name (or sid for Oracle).  
  2. edit <user-name> (the database user) and <password> (the database user's password).

Add JDBC Drivers to JBoss

You need to ensure you have a JDBC driver installed that matches the database system you are using. JDBC drivers can be placed in <quickstart>/jboss-5.1.0.GA/server/default/lib/. Ensure there are no different versions of the same driver in that directory.

You may find appropriate drivers in the following places:

  1. postgresql – http://jdbc.postgresql.org/download.html
  2. mysql – https://www.mysql.com/products/connector/ or http://dev.mysql.com/downloads/connector/j/
  3. Oracle – http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html?ssSourceSiteId=ocomen

Set the hibernate dialect

You will also need to modify the hibernate dialect in each of the affected bedework configuration files. Modifying the configuration is dealt with in more detail in configuring bedework.

The files affected by the change to the database are

  • <quickstart>/jboss-5.1.0.GA/server/default/conf/bedework/bwcore/dbconfig.xml
  • <quickstart>/jboss-5.1.0.GA/server/default/conf/bedework/carddavConfig/dirHandlers/user-dirHandler.xml
  • <quickstart>/jboss-5.1.0.GA/server/default/conf/bedework/eventreg/eventreg.xml
  • <quickstart>/jboss-5.1.0.GA/server/default/conf/bedework/synch/conf/synch-config.xml

In each case alter the line that looks like:

    <hibernateProperty>hibernate.dialect=org.hibernate.dialect.HSQLDialect</hibernateProperty>
And replace with one of the following
    <hibernateProperty>hibernate.dialect=org.hibernate.dialect.Oracle10gDialect</hibernateProperty>
    <hibernateProperty>hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect</hibernateProperty>
    <hibernateProperty>hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect</hibernateProperty>

The data

Note that the schema for 3.10 has not changed from that for previous versions. If your datasource refers to a COPY of your previous data it should work unchanged.

However, do NOT use your current database. It is recommended that you create a new database and restore a backup copy of your current data to that new database. This system will alter the data in ways that would prevent you reverting to the previous system.

Other database configurations

The following steps will help you configure a non-standard / unsupported database with Bedework.

Configure Hibernate to work with your database's SQL dialect

You need to set the same configuration files with the value

    <hibernateProperty>hibernate.dialect=org.hibernate.dialect.YourDialect</hibernateProperty>

The value yourDialect is a defined Hibernate SQL dialect such as org.hibernate.dialect.HSQLDialect or org.hibernate.dialect.MySQL5Dialect. The dialect is a class defined on the class path. Hibernate defines a number of ‘standard’ dialects.

For example, the global property if using MySQL5 would be

org.bedework.global.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

A list of dialects understood by Hibernate can be found at:

http://docs.jboss.org/hibernate/core/3.3/reference/en-US/html/session-configuration.html#configuration-optional-dialects

You can also look at the org.hibernate.dialect classes in the Hibernate jar file (for example, to use MySQL 5 which is not currently listed in the on-line Hibernate documentation, use org.hibernate.dialect.MySQL5Dialect ).

In addition you will need to locate and install the appropriate JDBC driver.

Bedework Enterprise Calendar Server, version 3.10