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 :
if(Clock.isBefore(this.creationTS, this.m_jdbcPooledConnection.getAvailableStartTime()) || Clock.isBefore(this.creationTS, this.m_jdbcPooledConnection.getBorrowedStartTime())) {
this.m_closed = Boolean.valueOf(true);
}
The Clock.isBefore(this.creationTS, this.m_jdbcPooledConnection.getAvailableStartTime()) returns true.
Could somebody please explain what this check is for?
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.
The isBefore looks like this:
public static boolean isBefore(long time1, long time2) {
return time1 < time2 - 1000L;
}
So, is the condition for the cases when connection was returned less than a second ago?
ps: tried validation query "select 1 from dual" - no effect