connectionRefusal

The driver's exception for a connection dataSource would not hand over: the one in ex's cause chain where the data source was carrying a driver failure, and otherwise an InitializationException restating the refusal - CONNECTION_UNAVAILABLE for a transient one, which is how a pool reports having none free, and CONNECTION_ERROR for the rest.

ex is whatever the data source raised, not only a SQLException: a pool that fails to start on the first borrow raises an unchecked exception of its own, HikariCP its PoolInitializationException, which usually carries the driver's failure and is restated where it does not.

The rule DataSource.getOctaviusSession() applies, shared by the two places this module takes a connection: OctaviusTemplate and OctaviusJdbcTransactionManager.