I use the quarkus framework, integrate hibernate reactive, and use the panache list method to query. I find that it do not use the connection pool, but use the connection directly. As a result, the query cannot be used after the connection is closed.
SqlClientConnection
public CompletionStage<RowSet<Row>> preparedQuery(String sql, Tuple parameters) {
feedback(sql);
String processedSql = usePostgresStyleParameters ? Parameters.process( sql, parameters.size() ) : sql;
return Handlers.toCompletionStage(
handler -> client().preparedQuery( processedSql ).execute( parameters, handler )
);
}
PanacheQueryImpl
@Override
public <T extends Entity> Uni<List<T>> list() {
return delegate.list();
}
I'd like to know how to use pool when querying?