title: The connection is closed when using Oracle UCP
body: <p>I'm getting random " The connection is closed: The connection is closed" errors when using Oracle UCP, v 12.1.0.2.0. It looks like connection is marked as closed in 
  oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory#invoke :</p>
  
  <pre><code>if(Clock.isBefore(this.creationTS, this.m_jdbcPooledConnection.getAvailableStartTime()) || Clock.isBefore(this.creationTS, this.m_jdbcPooledConnection.getBorrowedStartTime())) {
        this.m_closed = Boolean.valueOf(true);
  }
  </code></pre>
  
  <p>The Clock.isBefore(this.creationTS, this.m_jdbcPooledConnection.getAvailableStartTime()) returns true.</p>
  
  <p>Could somebody please explain what this check is for? </p>
  
  <p>The getAvailableStartTime is set when connection is retured to the pool, the creationTS - is set when JDBCConnectionProxyFactory is being created and it's being created when giving connection away. </p>
  
  <p>The isBefore looks like this:</p>
  
  <pre><code>public static boolean isBefore(long time1, long time2) {
          return time1 &lt; time2 - 1000L;
  }
  </code></pre>
  
  <p>So, is the condition for the cases when connection was returned less than a second ago?</p>
  
  <p>ps: tried validation query "select 1 from dual" - no effect</p>