How to use an external database?

Supported databases

  • Derby
  • MySQL
  • MS SQL Server
  • Oracle (not yet, but coming soon)

Configure Continuum

Standalone version

To use an external database with Continuum standalone, you must configure DataSources in $CONTINUUM_HOME/conf/jetty.xml

  <!-- continuum database -->
   
  <New id="continuum" class="org.mortbay.jetty.plus.naming.Resource">
    <Arg>jdbc/continuum</Arg>
    <Arg>
      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/continuum</Set>
        <Set name="user">sa</Set>
        <Set name="createDatabase">create</Set>
      </New>
    </Arg>
  </New>

  <New id="continuumShutdown" class="org.mortbay.jetty.plus.naming.Resource">
    <Arg>jdbc/continuumShutdown</Arg>
    <Arg>
      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/continuum</Set>
        <Set name="user">sa</Set>
        <Set name="shutdownDatabase">shutdown</Set>
      </New>
    </Arg>
  </New>
 
  <!-- Users / Security Database -->
  
  <New id="users" class="org.mortbay.jetty.plus.naming.Resource">
    <Arg>jdbc/users</Arg>
    <Arg>
      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
        <Set name="user">sa</Set>
        <Set name="createDatabase">create</Set>
      </New>
    </Arg>
  </New>

  <New id="usersShutdown" class="org.mortbay.jetty.plus.naming.Resource">
    <Arg>jdbc/usersShutdown</Arg>
    <Arg>
      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
        <Set name="user">sa</Set>
        <Set name="shutdownDatabase">shutdown</Set>
      </New>
    </Arg>
  </New>
  

Webapp

To use an external database with the Continuum webapp, you should configure the DataSource in your container.

Shutdown Procedure

When using an external database, it is very important to stop Continuum prior to stopping or restarting the database. Continuum may exhibit unpredictable behavior if the database disappears while it is running, and may not recover once the database comes back up. If this happens, you must re-start Continuum. If you experience errors after re-starting, the data may be corrupted and may need to be fixed by editing records directly in the database.