@Override
        public void connect(IAsyncResultHandler<IJdbcConnection> handler) {
            IJdbcConnection jdbcConnection = null;
            try {
                jdbcConnection = new DefaultJdbcConnection(ds.getConnection());
                handler.handle(AsyncResultImpl.create(jdbcConnection));
            } catch (Exception e) {
                handler.handle(AsyncResultImpl.create(e, IJdbcConnection.class));
            } finally {
                try {
                    // If not closed by now (since this is a synchronous implementation of the client
                    // interface) then the consumer messed up.  We'll be nice and close it for them here.
                    if (jdbcConnection != null && !jdbcConnection.isClosed()) {
                        LOGGER.warn("NOTE: closing a JDBC connection that should have already been closed! {0}", jdbcConnection); //$NON-NLS-1$
                        jdbcConnection.close();
                    }
                } catch (Exception e) {
                    // eat it
                }
            }
        }
@see io.apiman.gateway.engine.components.jdbc.IJdbcClient#connect(io.apiman.gateway.engine.async.IAsyncResultHandler)
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/DefaultJdbcComponent.java