io.agroal.api.configuration.AgroalDataSourceConfiguration Java Examples

The following examples show how to use io.agroal.api.configuration.AgroalDataSourceConfiguration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DataSourceTenantConnectionResolver.java    From quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * Create a new data source from the given configuration.
 * 
 * @param config Configuration to use.
 * 
 * @return New data source instance.
 */
private static AgroalDataSource createFrom(AgroalDataSourceConfiguration config) {
    try {
        return AgroalDataSource.from(config);
    } catch (SQLException ex) {
        throw new IllegalStateException("Failed to create a new data source based on the default config", ex);
    }
}
 
Example #2
Source File: AgroalDataSourceReplacement.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Substitute
static AgroalDataSource from(AgroalDataSourceConfiguration configuration, AgroalDataSourceListener... listeners)
        throws SQLException {
    return new DataSource(configuration, listeners);
}