@Experimental public interface PooledDataSourceFactory
Note: implementors of this interface must also implement a zero-arg constructor.
Modifier and Type | Method and Description |
---|---|
javax.sql.DataSource |
createDataSource(java.util.Properties poolProperties,
java.util.Properties dataSourceProperties)
Create and return a data source configured with the given properties.
|
javax.sql.DataSource createDataSource(java.util.Properties poolProperties, java.util.Properties dataSourceProperties)
If you desire to have the data source release its resources when the cache is closed
or the jndi-binding is removed, then also implement AutoCloseable
.
poolProperties
- properties to use to initialize the pool part of the data source
The poolProperties names can be any of the following: connection-url, user-name,
password, jdbc-driver-class, max-pool-size, init-pool-size, idle-timeout-seconds,
login-timeout-seconds, or blocking-timeout-seconds.dataSourceProperties
- properties to use to initialize the data source the pool will use
to create connections