/** Connect with the DataBase */ public static void Connect() { try { connection = (Connection) (DriverManager.getConnection(prepareConnectionURL())); } catch (SQLException e) { XUnitAssert.fail(formatDatabaseConnectionError("Connecting to Database", e)); } connection_established = true; }
/** Disconnect with the DataBase */ public void Disconnect() { if (connection != null) try { connection.close(); } catch (SQLException e) { XUnitAssert.fail(formatDatabaseConnectionError("Closing Database Connection", e)); } connection_established = false; }