--- Serge Knystautas <[EMAIL PROTECTED]> wrote:
David Graham wrote:
IMO, a design that allows users to plugin behaviors, be they
connection
retrieval or otherwise, is the best solution. Then the question
becomes
whether to include a connection retrieval behavior in the DBCP
release. I
think that's far outside the scope of DBCP and encourages users to
rely on
Jakarta code to fix their apps. That is a poor precedent to set.
I'm not sure what you mean... supporting abandoned code will not fix code, and having Jakarta code fix (and encourage better design and keep people from writing their own bad implementations to common problems) are all great precedents.
There is _no_ abandoned code approach that will fix code. Waiting for a
finalizer to return a database collection will never result in an application behaving well. The issue is having more control over what happens in this situation, such as preventing a rarely called piece of code from failing quickly (will fail slowly, ideally allowing you tolerate it until fix in an upcoming release).
Code should fail quickly to help debugging. If an app is worried about a
resource leak, it could write a plugin to DBCP that knows what to do. DBCP has no way of knowing what the app should do in the event of a
resource leak.
This really isn't a coding issue; it's a policy and management issue. If you have apps that are leaking connections, give each app its own DataSource so it doesn't affect other applications. This is clearly outside of DBCP's scope.
I agree that this is an education/policy issue. But sometimes you need a stop gap solution to keep something running while the customer fixes the problem.
I would like to see this stop gap solution included with the DBCP release. Along with quality docs on how to properly use a db connection pool and a big disclaimer that the recovery of abandoned connections should only be used as a stop gap in an emergency until the customer has time to fix their code.
Regards,
Glenn
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
