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.bwengine.core” from the “Object Name Filter” menu to the left of the page.
  2. Select “service=DbConf”
  3. You will be presented with a form allowing you to initialize the schema (create the database tables)
    1. Make sure the HibernateDialect attribute matches your database.   For example, for Postgresql, it should be set to org.hibernate.dialect.PostgreSQLDialect
    2. Set the Export attribute to True
    3. Set the SchemaOutFile to  <jboss directory>/server/default/data/bedework/dumprestore/schema.txt
    4. Click Apply Changes to set the values.
    5. Go to the bottom part of form and Invoke for the schema operation.
  4. Return to the front page of the JMX-Console and select "org.bedework.bwengine"
  5. Select "service=dumprestore"
  6. You will be presented with another form.  This one allow you to fill the tables with data.
    1. Set the AllowRestore attribute to True
    2. The “DataIn” attribute should point at the xml datafile you wish to restore.  By default, this is the initbedework.xml file (see note below)
    3. Click Apply Changes to set the values.
    4. Click Invoke for the restoreData operation.
  7. Select "org.bedework.bwengine" then "service=indexing"
  8. This page allows you to reindex the data - the new restored data needs to be indexed:
    1. Click Invoke for the rebuildIndex operation.
    2. Click "Back to MBean"
    3. invoke "rebuildStatus"
    4. Click "Reinvoke MBean operation" until indexes are rebuilt. Should not take long with the small amount of data.
       

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 file name in the DataIn attribute before invoking restoreData.

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 Synch Server Database

  1. Select “org.bedework.synch” from the “Object Name Filter” menu to the left of the page.
  2. Select “Name=synchConf,Type=synchConf,service=Synch"
  3. 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.  In the console you should see "INFO  [SchemaExport] schema export complete"

Bedework Enterprise Calendar Server, version 3.10