commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23066] New: - DriverManager.getConnection() throws DbcpException
Date Wed, 10 Sep 2003 15:05:30 GMT
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); <---------------------- !!!
        }
    }

Mime
View raw message