*/
public static Object startHsqldb(final String databaseFile,
final String databaseName) throws Exception
{
// Start DB in new thread, or else it will block us
final Server server = new Server();
Thread serverThread = new Thread(THREAD_NAME) {
public void run() {
try {
// Start server
Logger targetLogger = Logger.getLogger( "org.hsqldb" );
server.setLogWriter( new PrintWriter(
new StdOut2Log4jFilter( server.getLogWriter(), log, targetLogger.getEffectiveLevel() )) );
server.setDatabasePath( 0, databaseFile );
server.setDatabaseName( 0, databaseName );
server.setNoSystemExit( true );
server.setSilent( true );
server.start();
} catch (Exception e) {
log.error( e );
}
//log.error("Failed to start database", e);
}