Which one should I use for a modern backend Java application using Oracle OLTP database as a datasource?
To me HikariCP looks like a de-facto standard pool for a modern Java application. But now I need to maintain some project from the past, which is currently stuck at Oracle drivers v11 and using UCP. I am wondering now: does Oracle's UCP have any advantages over HikariCP? Would you use UCP or HikariCP?
Fresh Spring Boot project generated at start.spring.io will use HikariCP by default (Even though since 2.4 there is a support for UPC), until you explicitly enforce UCP in application.properties:
spring.datasource.type=oracle.ucp.jdbc.PoolDataSource
The Spring Boot docs say:
1. We prefer HikariCP for its performance and concurrency. If HikariCP is available, we always choose it.
...
4. If none of HikariCP, Tomcat, and DBCP2 are available and if Oracle UCP is available, we use it.
The Oracle website contains tutorials (1, 2) on how to use UCP with Spring Boot, but not explaining any advantages of such setup. I found an old StackOverflow answer mentioning some "non-blocking architecture", but I am still not sure if it makes UCP more valuable or reliable than HikariCP.