Java Code Examples for com.vladmihalcea.flexypool.strategy.RetryConnectionAcquiringStrategy#Factory
The following examples show how to use
com.vladmihalcea.flexypool.strategy.RetryConnectionAcquiringStrategy#Factory .
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: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<BoneCPDataSource> configuration = configuration(); return new FlexyPoolDataSource<BoneCPDataSource>(configuration, new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 2
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<AbstractDataSourceBean> configuration = configuration(); return new FlexyPoolDataSource<AbstractDataSourceBean>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 3
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<ViburDBCPDataSource> configuration = configuration(); return new FlexyPoolDataSource<ViburDBCPDataSource>(configuration, new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 4
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<DataSource> configuration = configuration(); return new FlexyPoolDataSource<DataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 5
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<AbstractDataSourceBean> configuration = configuration(); return new FlexyPoolDataSource<AbstractDataSourceBean>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 6
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<BasicDataSource> configuration = configuration(); return new FlexyPoolDataSource<BasicDataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 7
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<BasicDataSource> configuration = configuration(); return new FlexyPoolDataSource<BasicDataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 8
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<DataSource> configuration = configuration(); return new FlexyPoolDataSource<DataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 9
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<DruidDataSource> configuration = configuration(); return new FlexyPoolDataSource<DruidDataSource>( configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory( 5 ), new RetryConnectionAcquiringStrategy.Factory( 2 ) ); }
Example 10
Source File: AbstractFlexyDataSourceConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration configuration = configuration(); return new FlexyPoolDataSource(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(getMaxOverflowPoolSize()), new RetryConnectionAcquiringStrategy.Factory(getRetryAttempts()) ); }
Example 11
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<ComboPooledDataSource> configuration = configuration(); return new FlexyPoolDataSource<ComboPooledDataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 12
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<HikariDataSource> configuration = configuration(); return new FlexyPoolDataSource<HikariDataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 13
Source File: FlexyPoolConfiguration.java From flexy-pool with Apache License 2.0 | 5 votes |
@Bean(initMethod = "start", destroyMethod = "stop") public FlexyPoolDataSource dataSource() { Configuration<PoolingDataSource> configuration = configuration(); return new FlexyPoolDataSource<PoolingDataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(5), new RetryConnectionAcquiringStrategy.Factory(2) ); }
Example 14
Source File: FlexyPoolWrapper.java From hammock with Apache License 2.0 | 5 votes |
private DataSource wrapInternal(String name, HikariDataSource dataSource) { Configuration<HikariDataSource> configuration = createConfiguration(name, config, dataSource); int maxOverflow = config.getOptionalValue(format(MAX_OVERFLOW_PROPERTY_FORMAT, name), Integer.class).orElse(5); int retry = config.getOptionalValue(format(RETRY_PROPERTY_FORMAT, name), Integer.class).orElse(2); return new FlexyPoolDataSource<HikariDataSource>(configuration, new IncrementPoolOnTimeoutConnectionAcquiringStrategy.Factory(maxOverflow), new RetryConnectionAcquiringStrategy.Factory(retry) ); }
Example 15
Source File: FlexyPoolConfigurationTests.java From spring-boot-data-source-decorator with Apache License 2.0 | 4 votes |
@Bean public RetryConnectionAcquiringStrategy.Factory<HikariDataSource> retryConnectionAcquiringStrategy() { return new RetryConnectionAcquiringStrategy.Factory<>(5); }