public synchronized void close() {
        try {
            for (DBConnection dbc : free)
                dbc.close();
            for (DBConnection dbc : used)
                dbc.close();
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }