This discussion is archived
2 Replies Latest reply: Nov 8, 2012 5:04 PM by jschellSomeoneStoleMyAlias RSS

How to store several available connections in UCP

kite Newbie
Currently Being Moderated
I'm creating connection manager class that would return connections to the customers of the class. My goal is to always have 2 available connections in pool so I wouldn't loose time for creating connections. When I return the available connection, I need to make UCP create new available connection, so it would be always 2 connections available.

The problem is UCP doesn't have an option to control it. I've read the UCP documentation, but hadn't found any solution.

There is setMinPoolSize() method, but it controls available + borrowed connections, not only the available ones. And it doesn't create new connections in case you haven't reached the minimum pool size.
Also there is a harvestable connection functionality, but it harvests existing (borrowed) connections instead of creating new.

Is there any way to make UCP create new available connection when I borrow one from UCP.

Note: I'm using Oracle 11.2.0.3 and the latest ucp.jar (for Oracle 11.2.0.3)
  • 1. Re: How to store several available connections in UCP
    kite Newbie
    Currently Being Moderated
    Answered here: http://stackoverflow.com/questions/13238479/how-to-make-oracle-ucp-always-store-several-available-connections/13247842#13247842
  • 2. Re: How to store several available connections in UCP
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    kite wrote:
    My goal is to always have 2 available connections in pool so I wouldn't loose time for creating connections.
    These days that isn't generally a problem that one needs to manage in detail for a standard data center set up.
    High volume (really high volume) applications that benefit from this often will measure that sort of time at such low levels that it nothing more than noise compared to processing for the rest of system. Not to mention of course that if the database API usage itself seems likely to be a bottleneck then designing for that rather than attempting to optimize it afterwards is going to provides significantly better performance.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points