It would be very helpful if C3P0 could be configured
either to not use helper threads at all
(single-threaded mode) or to shut down helper threads
if no connections are active for a long period of time.
This would be useful to me because I use C3P0 to create
"temporary" pools to access user-defined data sources
on-the-fly. These pools might be used for a while
(hours or days), and then never again for the lifetime
of the JVM. There is no easy way to determine when a
user is done with the pool, but I don't want the
threads to stay around forever.
I could create my own timer thread and close the pool
after so many hours of inactivity, but it would be
great if C3P0 could do this itself and then "reopen"
the pool if a new connection request comes in.
Log in to post a comment.