Open arjav-desai opened 3 years ago
We do not allow using a different connection pool in MP based on a property. You need to choose the correct implementation (a module) - either UCP or Hikari. Then you specify the driver to use using the class name (same as in Helidon SE).
jdbc implementation of DbClient is based on Hikari as a design choice. If we want to support other data source, we have the following options:
ConnectionPool
and have Hikari as the default implementationWhat is the use case to use a different library?
The issue is that by providing support only for Hikari's jdbcUrl
property and not its dataSourceClassName
property we are not allowing the Hikari connection pool to function to its full potential. See the first two configuration properties in this list: we currently only specify the second one.
Currently, when we config DB client, we provide "source" which picks up "HikariCP" and sets jdbcUrl on "HikariConfig" based on "connection:url".
Based on https://github.com/brettwooldridge/HikariCP#essentials and looking at code, it seems to be using DriverManager based DS i.e. java/com/zaxxer/hikari/util/DriverDataSource.java. We should expose driver/factory className property, just like we do for MP.