java/jdbc-loopback-driver/src/info/globalcode/jdbc/loopback/Driver.java
branchv_0
changeset 235 8ce612cca4d8
parent 177 5cc7fdad1452
equal deleted inserted replaced
234:305871254838 235:8ce612cca4d8
    44 	@Override
    44 	@Override
    45 	public Connection connect(String url, Properties info) throws SQLException {
    45 	public Connection connect(String url, Properties info) throws SQLException {
    46 		if (acceptsURL(url)) {
    46 		if (acceptsURL(url)) {
    47 			return new Connection(url, info);
    47 			return new Connection(url, info);
    48 		} else {
    48 		} else {
    49 			throw new SQLException("Unsupported URL: " + url);
    49 			// The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL.
       
    50 			return null;
    50 		}
    51 		}
    51 	}
    52 	}
    52 
    53 
    53 	@Override
    54 	@Override
    54 	public boolean acceptsURL(String url) throws SQLException {
    55 	public boolean acceptsURL(String url) throws SQLException {