In Oracle JDBC 11g Release 1 (11.x), there is a property, "UseLIFO" as connectionCacheProperty, which allows us to "last in first out" retrieval of connections-
connectionCacheProp.setProperty("UseLIFO", "true");
But if I use Oracle UCP (Universal Connection Pool). Then I have no way to tell UCP to retrieve connection from pool in LIFO manner.