title: Connection closed issue in UCP and Oracle 12 c
body: <p>While migrating from Oracle 11g to Oracle 12 c, we are getting below error using UCP(12.1.0.2.0) </p>
  
  <pre><code>    java.sql.SQLException: The connection is closed: The connection is closed
              at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:464)
              at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:448)
              at oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory.invoke(JDBCConnectionProxyFactory.java:307)
              at oracle.ucp.jdbc.proxy.ConnectionProxyFactory.invoke(ConnectionProxyFactory.java:50)
              at com.sun.proxy.$Proxy24.prepareStatement(Unknown Source)
  </code></pre>
  
  <p>This is multithreaded application where we take connection from UCP pool, use it and then close the connection.
              However for some of the operation we are getting the above error on the line - connection.prepareStatement(statement) 
              We are using PoolDataSource</p>
  
  <p>Few things tried
              1) Using default values for connection pool and only setting minimum, maximum pool size.
              2) Setting setValidateConnectionOnBorrow as true,
              3) Setting setValidateConnectionOnBorrow as true and setValidateConnectionOnBorrow as "SELECT 1 FROM DUAL"
              4) Using Labelled Connection
              5) The db doesn't disconnect the connection after a particular time and also there is no firewall which blocks connection.
              6) Using setMaxConnectionReuseTime</p>
  
  <p>I have referred few links which shows similar issues. However it doesn't show any resolution
  <a href="https://community.oracle.com/thread/2183613" rel="nofollow noreferrer">https://community.oracle.com/thread/2183613</a></p>
  
  <p><a href="https://community.oracle.com/thread/2298699" rel="nofollow noreferrer">https://community.oracle.com/thread/2298699</a></p>
  
  <p><a href="https://stackoverflow.com/questions/34557528/the-connection-is-closed-when-using-oracle-ucp">The connection is closed when using Oracle UCP</a></p>
  
  <p>Has anyone faced similar issue on Oracle 12C with UCP?? Is there some bug in latest UCP??  </p>