• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Rancher
Posts: 1044
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic