use of org.hibernate.reactive.pool.impl.DefaultSqlClientPool in project hibernate-reactive by hibernate.
the class ReactiveConnectionPoolTest method configureAndStartPool.
private ReactiveConnectionPool configureAndStartPool(Map<String, Object> config) {
DefaultSqlClientPoolConfiguration poolConfig = new DefaultSqlClientPoolConfiguration();
poolConfig.configure(config);
registryRule.addService(SqlClientPoolConfiguration.class, poolConfig);
registryRule.addService(JdbcServices.class, new JdbcServicesImpl() {
@Override
public SqlStatementLogger getSqlStatementLogger() {
return new SqlStatementLogger();
}
});
DefaultSqlClientPool reactivePool = new DefaultSqlClientPool();
reactivePool.injectServices(registryRule.getServiceRegistry());
reactivePool.configure(config);
reactivePool.start();
return reactivePool;
}
Aggregations