Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"SQLException: The connection is closed:" with Oracle Universal Connection Pool

 
Ivan Jozsef Balazs
Rancher
Posts: 986
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A daemon process (a long running program) uses Oracle Universal Connection Pool to connect to Oracle.

It gets sometimes these exceptions:

java.sql.SQLException: The connection is closed: The connection is closed

in cases when there is a long running HTTPS communication during the transaction.

Is this SQLException maybe due to an incorrect value in the connection pool settings?
It would not be nice if the connection pool closed a borrowed connection.

The docu says:

Setting the Maximum Connection Reuse Time

The maximum connection reuse time allows connections to be gracefully closed and removed from the pool after a connection has been in use for a specific amount of time.
The timer for this property starts when a connection is physically created. Borrowed connections are closed only after they are returned to the pool and the reuse time has been exceeded.


The Time-To-Live Connection Timeout is the one which enables the pool to potentially reclaim the connection while it is borrowed, but I do not set this one.
I only set the following ones, not the Time-To-Live Connection Timeout:




A sidenote: the connections are closed (returned to the pool) in the "finally" block.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic