Код: Выделить всё
ConnectionFactory connectionFactory = ConnectionFactories.get(ConnectionFactoryOptions.builder()
.option(HOST, host)
.option(PORT, port)
.option(USER, userName)
.option(PASSWORD, password)
.option(DRIVER, driver) //driver is pool
.option(DATABASE, service)
.option(PROTOCOL, protocol) //protocol is oracle
Код: Выделить всё
Flux
.usingWhen(con.getConnection(),
connection -> connection.createStatement(
"SELECT QUERY")
.execute(),
connection -> {
return connection.close(); // Ensure it's returned to the pool
}).subscribeOn(Schedulers.boundedElastic())
.flatMap(result -> result.map(row -> {
ResultDto rto = new ResultDto(row.get("x", String.class), row.get("c", Double.class),
row.get("y", String.class));
return rto;
})).doOnError(e -> {
throw new RuntimeException("DB error on select", e);
}).collectList().block();
Код: Выделить всё
reactor.core.Exceptions$ErrorCallbackNotImplemented: io.r2dbc.spi.R2dbcTimeoutException: Connection acquisition timed out after 10000ms
Caused by: io.r2dbc.spi.R2dbcTimeoutException: Connection acquisition timed out after 10000ms
Спасибо
Исуру
Я попробовал вызвать соединитель мула с помощью oracle r2dbc в приложении Anypoint Studio Mule
Подробнее здесь: https://stackoverflow.com/questions/790 ... on-connect