You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/09/10 17:05:30 UTC
DO NOT REPLY [Bug 23066] New: -
DriverManager.getConnection() throws DbcpException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23066>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23066
DriverManager.getConnection() throws DbcpException
Summary: DriverManager.getConnection() throws DbcpException
Product: Commons
Version: 1.0 Final
Platform: All
OS/Version: Other
Status: NEW
Severity: Major
Priority: Other
Component: Dbcp
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: rew@simple.com.pl
Why DbcpException ?
getConnection should throw SQLException, when calling DriverManager.getConnection
I expecting only SQLException when invoking getConnection (or Exception if there
are some critical bugs in code).
In some circumstances I can't handle DbcpException.
DriverManagerConnectionFactory:
public Connection createConnection() {
try {
if(null == _props) {
if((_uname == null) || (_passwd == null)) {
return DriverManager.getConnection(_connectUri);
} else {
return DriverManager.getConnection(_connectUri,_uname,_passwd);
}
} else {
return DriverManager.getConnection(_connectUri,_props);
}
} catch(SQLException e) {
throw new DbcpException(e); <---------------------- !!!
}
}