OracleDataSource vs. Oracle UCP PoolDataSource

后端 未结 8 1862
无人共我
无人共我 2020-12-02 10:24

I was researching some JDBC Oracle Connection Pooling items and came across a new(er) Oracle Pool implementation called Universal Connection Pool (UCP). Now this uses a new

8条回答
  •  离开以前
    2020-12-02 10:31

    I tested the UCP and deployed it to production in a Spring 3.0.5 Hibernate app using Spring JMS listener containers and Spring-managed sessions and transactions using the @Transactional annotation. The data sometimes causes SQL constraint errors, due to separate listener threads trying to update the same record. When that happens, the exception is thrown by one method annotated by @Transactional and the error is logged into the database using another method annotated by @Transactional. For whatever reason, this process seems to result in a cursor leak, that eventually adds up and triggers the ORA-01000 open cursor limit exceeded error, causing the thread to cease processing anything.

    OracleDataSource running in the same code doesn't seem to leak cursors, so it doesn't cause this problem.

    This is a pretty weird scenario, but it indicates to me that it's a little too early to be using the UCP in an application with this kind of structure.

提交回复
热议问题