Hibernate, connection pool and firewall question

J

javaguy_in_wheaton

An odd combination of topics, to be sure.

My current web application (Tomcat hosted) has a custom-rolled
connection pool. The Informix DB I connect to is across a firewall
that terminates existing connections after 120 minutes, regardless of
their current activity. My pool handles this by detecting the
creation date of a connection it wants to reuse. If that connection
was created > 60 minutes ago it closes the connection and fetches a
replacement to use in the pool.

Simply using a connection until the 120 minute barrier is reached
isn't acceptable because the DB isn't smart enough to realize that the
firewall has stopped the connection's use. The explicit release after
60+ minutes releases the connection and keeps the simultaneous
connection use down (we are licensed by the number of simultaneous
connections).

When I look at Hibernate and its connection pools (DBCP and C3P0,
there might be others) I'd like to use their stuff instead of my
home-grown pool. But I don't really see a parameter like "only use
this connection for 60 minutes" or such. Can I find such a parameter
in one of the pool possibilities?

TIA,
Jerome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top