Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How good is Oracle Universal Connection Pool (UCP)

Does anybody have experience with using Oracle UCP under real production load? Does it handle database reconnects well? Are there any multi-threading issues? Has anybody compared it with C3P0 or Apache DBCP?

like image 724
Andrey Ashikhmin Avatar asked Mar 11 '10 08:03

Andrey Ashikhmin


People also ask

What is UCP connection pool?

A UCP JDBC connection pool can use any JDBC driver to create physical connections that are then maintained by the pool. The pool can be configured and provides a full set of properties that are used to optimize pool behavior based on the performance and availability requirements of an application.

Which connection pool is best for spring boot?

Spring Boot uses HikariCP as the default connection pool, due to its remarkable performance and enterprise-ready features.

Which is the best connection pooling in Java?

There are multiple JDBC frameworks for connection pooling the most popular choices being Tomcat JDBC and HikariCP. Whatever framework you choose it's important to configure the properties correctly, (a big plus of HikariCP is that it offers good defaults for optional configs).

Which is best connection pool for hibernate?

C3P0 is an open source JDBC connection pool distributed along with Hibernate in the lib directory. Hibernate will use its org. hibernate.


2 Answers

I evaluated UCP 11.2.0.1 as a replacement for our legacy connection pool and I cannot recommend it:

  • it does not fully support jdk 6 / ojdbc6.jar. For example the use of statement caching and jmx-support does not work with java 6 and throws exceptions.
  • no internal statement cache - it relies on the jdbc driver's statement cache (setPoolable())
  • I submitted both issues to oracle, they confirmed it and will probably fix it when oracle 12.0 will be released. But even that's not for sure.
  • Too few releases (2 releases in 3 years), too less community support.
  • Not Open-Source
  • Hardly extensible. Only a few callbacks with an horrible interface design.
    Example: You want to be notified when a Connection exceeds its TTL? Prepare for a wrapper DataSource and a mass usage of internal/proprietary UCP APIs. The official documentation (last update: 2008) remains silent how to achive this.
  • Fat design (almost a 0,5 MB jar) - many classes with similar names/function (e.g. there's a PoolDataSource and a ConnectionPool - both are related but invoked differently and provide slightly different functionality.)
  • java.util.logging only


UPDATE 1 (April 2014):
Although slightly off-topic: As a result of my evaluation I decided to go with the new tomcat jdbc-pool - and it is working almost perfectly since a year in several production systems. It's very well designed, updated regularly, extensible and the apache tomcat team does a good job in responding to questions/fixing issues.

UPDATE 2 (July 2016):
I can now highly recommend HikariCP which I'm currently favoring over all other connection pools.
Its architecture, focus on correctness and performance is just amazing.

like image 147
MRalwasser Avatar answered Oct 05 '22 01:10

MRalwasser


I have used UCP in a system with around 10 transactions per seconds (mean) and 360 transactions per seconds peak, and no problems yet. (Number is per app server with 8 servers)

However the main benefits you get from UCP is when you are using Oracle RAC and the TAF/FAN functionality, UCP with Dataguard or if you are running something outside an appserver.

like image 35
oluies Avatar answered Oct 05 '22 00:10

oluies