https://issues.apache.org/bugzilla/show_bug.cgi?id=50571
Summary: Tomcat 7 JDBC connection pool exception enhancement
Product: Tomcat Modules
Version: unspecified
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: jdbc-pool
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=26476)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26476)
Created against http://svn.apache.org/repos/asf/tomcat/trunk on 20110111
I am working with the new JDBC connection pool in Tomcat 7, and it's great!
Nice work.
Once enhancement I would like to suggest is more control over the
SQLException's that come out of the DataSource. Certain interceptors (eg:
ConnectionState) catch SQLException's and log them, thereby preventing the
layer above DataSource from being able to detect and handle SQL problems.
For example, if a DataSource.getConnection() is created with an invalid
database name, the ConnectionState interceptor will catch and log (eg:
reset()), leaving the caller with no control over log output or knowing what
the specific problem with the DataSource was. I am working on an application
where the datasources are more dynamic than the typical statically defined
datasources in managed application servers, therefore I want to be able to
detect and handle SQLException's that are raised from the ConnectionPool.
I have provided a patch that illustrates the type of change I'm talking about.
As you can see, this causes SQLExceptions to propagate through several other
APIs, but I think this is an improvement. This different exception handling
strategy could also be enabled with a property.
Thoughts?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]