dk.netarkivet.archive.arcrepository.bitpreservation
Class DBConnect

java.lang.Object
  extended by dk.netarkivet.archive.arcrepository.bitpreservation.DBConnect

public class DBConnect
extends java.lang.Object

Logic to connect with the harvest definition database. This also defines basic logic for checking versions of tables. The statements to create the tables are in scripts/sql/createBitpreservationDB.sql


Method Summary
static java.sql.Connection getDBConnection(java.lang.String dbUrl)
          Get a connection to our database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDBConnection

public static java.sql.Connection getDBConnection(java.lang.String dbUrl)
                                           throws IOFailure
Get a connection to our database. If a connection is already registered to the current thread, checks that it is valid, and if not renews it. Assumes that AutoCommit is true.

Returns:
a connection to our database
Throws:
IOFailure - if we cannot connect to the database (or find the driver).