Initializing your databases

Start Bedework

Having rebuilt Bedework with your configuration, start up Bedework in order to get to the JMX console.  From the JMX console, you have access to the Bedework utilities (mbeans) that create the Bedework database tables and inject some starter data.

Once Bedework is up and running, visit http://yourserver:8080/jmx-console.
(See "The JMX-Console" for information about how to access and secure the JMX console.)

Export the schema, create the database tables, and inject some starter data into the Bedework Database

  1. Select “org.bedework” from the “Object Name Filter” menu to the left of the page.
  2. Select “service=DumpRestore”
  3. You will be presented with a form allowing you to manage the dump/restore process.  The “DataIn” attribute should point at the xml datafile you wish to restore.  By default, this is the initbedework.xml file. 
  4. Initialize the schema:
    1. Set the attribute Export to True
    2. Set the attribute Create to True
    3. Click Apply Changes to set the values.
    4. Click Invoke for the schema operation.
  5. Restore the data (Read the note below)
    1. Navigate back to the DumpRestore service (click Back to MBean)
    2. Click Invoke for the restoreData operation.

The quickstart ships with two initialization files:

  • <jboss-dir>/server/default/data/bedework/dumprestore/initbedework.xml
  • <jboss-dir>/server/default/data/bedework/dumprestore/initbedework-sparse.xml

initbedework.xml contains a basic calendar structure, many categories, two calendar suites, and the handful of users & groups that allow the quickstart demonstration to run. It is a good starting point for most deployments.

initbedework-sparse.xml contains no events, no categories, no locations, no contacts, and the barest of calendar structures.  Unless you are a Bedework expert, you'll want to use the other one.

The default is initbedework.xml.  You can override it by adding -sparse to the xxxx field before invoking restoreData.

 

Initialize the Bedework Timezone Server Database

  1. Select “org.bedework” from the “Object Name Filter” menu to the left of the page.
  2. Select "service=Tzsvr”
  3. Look for recreateDb in the bottom section of the form. Click Invoke.
  4. Look for refreshData in the bottom section of the formClick Invoke.

Initialize the Bedework Carddav Server Database

  1. Select “org.bedework.carddav” from the “Object Name Filter” menu to the left of the page.
  2. Select “Name=user-dirHandler,Type=dirhandler,service=CardDav” 
  3. Set hibernate dialect.  There are two parameters to the SetHibernateProperty operation:
    1. Set the name parameter to hibernate.dialect
    2. Set the value parameter to the db dialect you want. 
      1. Hibernate class names for the dialect take the form org.hibernate.dialect.X
        For example:
        for hsql (as shipped) - org.hibernate.dialect.HSQLDialect
        for postgresql - org.hibernate.dialect.PostgreSQLDialect
        for oracle10g - org.hibernate.dialect.Oracle10gDialect
        for mysql - org.hibernate.dialect.MySQL5InnoDBDialect (innodb is required)
    3. Click Invoke for the operation.
    4. Click the Back to Mbean button
    5. Invoke the saveConfig operation (at the bottom of the operations list) to make it permanent
    6. Click the Back to Mbean button
    7. Probably safer to do a restart of jboss at this point
  4. Initialize the schema:
    1. Set the attribute Export to True
    2. Click Apply Changes to set the values.
    3. Click Invoke for the schema operation.
    4. Check the console for errors

Initialize the Bedework Sync Server Database

  1. Select “org.bedework” from the “Object Name Filter” menu to the left of the page.
  2. Select “service=Synch”
  3. Initialize the schema:
    1. Set the attribute Export to True
    2. Set the attribute Create to True
    3. Click Apply Changes to set the values.
    4. Click Invoke for the schema operation.

Bedework Enterprise Calendar, version 3.9