Class PoolingDataSourceFactory
java.lang.Object
org.frankframework.jdbc.datasource.ObjectFactory<DataSource, CommonDataSource>
org.frankframework.jdbc.datasource.NonTransactionalDataSourceFactory
org.frankframework.jdbc.datasource.DataSourceFactory
org.frankframework.jdbc.datasource.PoolingDataSourceFactory
- All Implemented Interfaces:
IDataSourceFactory, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
AbstractXADataSourceFactory, LadyBugDataSourceFactory
Factory through which (TX-enabled) Pooling DataSources can be retrieved.
Already created DataSources are stored in a ConcurrentHashMap.
Every DataSource can be augmented before it is added.
-
Nested Class Summary
Nested classes/interfaces inherited from class ObjectFactory
ObjectFactory.ObjectInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected intprotected intprotected StringFields inherited from class ObjectFactory
logFields inherited from interface IDataSourceFactory
DEFAULT_DATASOURCE_NAME_PROPERTY, GLOBAL_DEFAULT_DATASOURCE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull DataSourceaugmentDatasource(@NonNull CommonDataSource dataSource, @NonNull String dataSourceName) Allow implementing classes to augment the DataSource.protected @NonNull org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool<org.apache.tomcat.dbcp.dbcp2.PoolableConnection> createConnectionPool(@NonNull org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory poolableConnectionFactory) protected @NonNull DataSourcecreatePool(@NonNull DataSource dataSource, @NonNull String dataSourceName) static booleanisPooledDataSource(@NonNull CommonDataSource dataSource) Methods inherited from class DataSourceFactory
augment, toObjectInfoMethods inherited from class NonTransactionalDataSourceFactory
getDataSource, getDataSourceNamesMethods inherited from class ObjectFactory
add, afterPropertiesSet, destroy, destroyObject, get, getObjectInfo, getObjectNames, postDestroyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IDataSourceFactory
getDataSource
-
Field Details
-
minIdle
protected int minIdle -
maxPoolSize
protected int maxPoolSize -
maxIdle
protected int maxIdle -
maxLifeTime
protected int maxLifeTime -
connectionCheckInterval
protected int connectionCheckInterval -
testQuery
-
-
Constructor Details
-
PoolingDataSourceFactory
public PoolingDataSourceFactory()
-
-
Method Details
-
augmentDatasource
protected @NonNull DataSource augmentDatasource(@NonNull CommonDataSource dataSource, @NonNull String dataSourceName) Description copied from class:DataSourceFactoryAllow implementing classes to augment the DataSource. SeeDataSourceFactory.augment(CommonDataSource, String).- Overrides:
augmentDatasourcein classDataSourceFactory
-
isPooledDataSource
-
createPool
protected @NonNull DataSource createPool(@NonNull DataSource dataSource, @NonNull String dataSourceName) -
createConnectionPool
protected @NonNull org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool<org.apache.tomcat.dbcp.dbcp2.PoolableConnection> createConnectionPool(@NonNull org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory poolableConnectionFactory)
-