java – Consumer Producer problem solution using JDBI, MySQL, HikariCP

The application involves solving the producer-consumer problem. It would be good to have feedback on overall design, testability and general advice on how to improve again. I have some doubts about choosing the right approach when testing for a temporary database failure.

@ Slf4j
Public class DataSource {

private static final String CONFIG_FILE = "src / main / resources / db / db.properties";
HikariConfig static private config = new HikariConfig (CONFIG_FILE);

private static HikariDataSource ds;

static{
try {
ds = new HikariDataSource (config);
} catch (CJCommunicationsException | HikariPool.PoolInitializationException e) {
log.info (e.getMessage ());
}
}

Holder of the static class {
static DataSource INSTANCE = new DataSource ();
}

private data source () {}

public static DataSource getInstance () {
return the holder.INSTANCE;
}

public static connection getConnection () throws SQLException {
return ds.getConnection ();
}

HikariDataSource static public getDs () {
send back ds;
}
}