Uses of Class
org.dbunit.database.CachingConnectionProvider
Packages that use CachingConnectionProvider
-
Uses of CachingConnectionProvider in org.dbunit
Constructors in org.dbunit with parameters of type CachingConnectionProviderModifierConstructorDescriptionDataSourceDatabaseTester(DataSource dataSource, String schema, CachingConnectionProvider connectionProvider) Creates a new DataSourceDatabaseTester with the specified DataSource and schema name, reusing oneIDatabaseConnectionacross calls via the givenCachingConnectionProviderinstead of creating a new one on every call.
Share the sameconnectionProviderinstance across the testers created for each test to get reuse across test methods; pair it withIOperationListener.NO_OP_OPERATION_LISTENER(or an equivalent non-closing listener) so the cached connection is not closed after everyAbstractDatabaseTester.onSetup()/AbstractDatabaseTester.onTearDown()call.DataSourceDatabaseTester(DataSource dataSource, String schema, CachingConnectionProvider connectionProvider, DatabaseConfig databaseConfig) Creates a new DataSourceDatabaseTester with the specified DataSource, schema name, optionalCachingConnectionProvider, and optionalDatabaseConfigwhose property and feature values are applied to every connection this tester creates - for example to setDatabaseConfig.PROPERTY_DATATYPE_FACTORYfor a specific database without needing anIOperationListener.DefaultDatabaseTester(CachingConnectionProvider connectionProvider, Callable<IDatabaseConnection> connectionFactory) Creates a new DefaultDatabaseTester that reuses one connection - created with the given factory - across calls via the givenCachingConnectionProvider, transparently replacing it if it is no longer alive.
Share the sameconnectionProviderinstance across the testers created for each test to get reuse across test methods; pair it withIOperationListener.NO_OP_OPERATION_LISTENER(or an equivalent non-closing listener) so the cached connection is not closed after everyAbstractDatabaseTester.onSetup()/AbstractDatabaseTester.onTearDown()call.JdbcDatabaseTester(String driverClass, String connectionUrl, String username, String password, String schema, CachingConnectionProvider connectionProvider) Creates a new JdbcDatabaseTester with the specified properties, reusing oneIDatabaseConnectionacross calls via the givenCachingConnectionProviderinstead of creating a new one on every call.
Share the sameconnectionProviderinstance across the testers created for each test to get reuse across test methods; pair it withIOperationListener.NO_OP_OPERATION_LISTENER(or an equivalent non-closing listener) so the cached connection is not closed after everyAbstractDatabaseTester.onSetup()/AbstractDatabaseTester.onTearDown()call.JndiDatabaseTester(Properties environment, String lookupName, String schema, CachingConnectionProvider connectionProvider) Creates a JndiDatabaseTester with specific JNDI properties, reusing oneIDatabaseConnectionacross calls via the givenCachingConnectionProviderinstead of creating a new one on every call.
Share the sameconnectionProviderinstance across the testers created for each test to get reuse across test methods; pair it withIOperationListener.NO_OP_OPERATION_LISTENER(or an equivalent non-closing listener) so the cached connection is not closed after everyAbstractDatabaseTester.onSetup()/AbstractDatabaseTester.onTearDown()call.PropertiesBasedJdbcDatabaseTester(CachingConnectionProvider connectionProvider) Creates a newJdbcDatabaseTesterusing specificSystem.getProperty(String)values as initialization parameters, reusing oneIDatabaseConnectionacross calls via the givenCachingConnectionProviderinstead of creating a new one on every call.
Share the sameconnectionProviderinstance across the testers created for each test to get reuse across test methods; pair it withIOperationListener.NO_OP_OPERATION_LISTENER(or an equivalent non-closing listener) so the cached connection is not closed after everyAbstractDatabaseTester.onSetup()/AbstractDatabaseTester.onTearDown()call.