public static ConfigurableConnection create(ConnectionOptions options, Config config)
throws IOException {
Assert.notNull(options, "options");
Assert.notNull(config, "config");
ConnectionHandler handler = new ConnectionHandler(options.copy(), new Config(config));
ConfigurableConnection proxy = (ConfigurableConnection) Proxy.newProxyInstance(
Connection.class.getClassLoader(), CONNECTION_TYPES, handler);
handler.createConnection(proxy);
return proxy;
}