java – Troubleshooting Consumer Producer using JDBI, MySQL, HikariCP

The application involves solving the producer-consumer problem. It would be great to have comments on the overall design, the ability to test and the general advice on how to keep improving. I have doubts about choosing the right approach when testing a temporary interruption of the database.

@ Slf4j
public class data source {

private static end string CONFIG_FILE = "src / main / resources / db / db.properties";
static private configuration of HikariConfig = new HikariConfig (CONFIG_FILE);

static private HikariDataSource ds;

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

Static class holder {
DataSource INSTANCE = new DataSource ();
}

Private data source () {}

Static public dataSource getInstance () {
back Holder.INSTANCE;
}

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

Static public harvest of HikariDataSource getDs () {
return ds;
}
}