public static void closeDatabase() throws SQLException {
		try {
			String dbUrl = getDatabaseUrl();
			dbProperties.put("shutdown", "true");
			dbConnection = DriverManager.getConnection(dbUrl, dbProperties);
		} catch (SQLException ex) {
			dbProperties.remove("shutdown");
			// If the database is successfully shutted-down, Derby throws an SQLException with
			// errorCode = 45.000 and SQLState = 080006.
			int errorCode = ex.getErrorCode();
			if (!(errorCode == 45000 && "08006".equals(ex.getSQLState()))) {
				throw ex;
			}
			log.info("Database successfully shutted-down");
		}
    }