if (hsqlDB == null)
{
hsqlDB = new HsqlDB(DATABASE_URL, DATABASE_DRIVER, "conf/testdb.script");
}
BasicDataSource datasource = new BasicDataSource();
datasource.setDriverClassName(DATABASE_DRIVER);
datasource.setUrl(DATABASE_URL);
datasource.setUsername(DATABASE_USERNAME);
datasource.setPassword(DATABASE_PASSWORD);
this.datasource = datasource;
// prepare the database
IDatabaseConnection connection = new DatabaseConnection(datasource.getConnection());
IDataSet dataSet = new XmlDataSet(new FileInputStream("conf/dataset.xml"));
try
{
DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);