Dynamically load a JDBC™ driver
server=db.somedomain.org port=3306 ... driver=mariadb-java-client-3.3.3.jar |
|
import java.sql.Driver;
...
public class DriverShim implements Driver {
private Driver driver;
DriverShim(Driver driver) {
this.driver = driver;
}
@Override
public Connection connect(String s, Properties properties) throws SQLException {
return driver.connect(s, properties);
}
@Override
public boolean acceptsURL(String u) throws SQLException {
return driver.acceptsURL(u);
}
...
}