public class TomcatJdbcDataSourceFactory extends org.apache.tomcat.jdbc.pool.PoolProperties implements DataSourceFactory
DataSourceFactory implementation that creates a JDBC pool
backed datasource. Allows the configuration of all configuration properties except
username, password, url and driver class name because they are passed in while actually
creating the datasource. All other properties can be modified by calling the respective
setter methods. This class uses a DatabasePlatformSupport implementation to
actually retrieve the driver class name and url in order to create the datasource.
All properties are derived from PoolConfiguration of the Tomcat JDBC Pool
class.
| Constructor and Description |
|---|
TomcatJdbcDataSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeDataSource(DataSource dataSource)
Will be called if the datasource is not used anymore to allow the factory to
release any resource that are used by the created object.
|
org.apache.tomcat.jdbc.pool.DataSource |
createDataSource(DataSourceInformation dataSourceInformation)
Creates a datasource with the passed in information.
|
void |
setDatabasePlatformSupport(DatabasePlatformSupport databasePlatformSupport) |
void |
setDefaultTransactionIsolationName(String constantName) |
void |
setDriverClassName(String driverClassName) |
void |
setPassword(String password) |
void |
setUrl(String url) |
void |
setUsername(String username) |
clone, getAbandonWhenPercentageFull, getCommitOnReturn, getConnectionProperties, getDataSource, getDataSourceJNDI, getDbProperties, getDefaultAutoCommit, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getDriverClassName, getInitialSize, getInitSQL, getJdbcInterceptors, getJdbcInterceptorsAsArray, getLogValidationErrors, getMaxActive, getMaxAge, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getName, getNumTestsPerEvictionRun, getPassword, getPoolCounter, getPoolName, getPropagateInterruptState, getProperties, getRemoveAbandonedTimeout, getRollbackOnReturn, getSuspectTimeout, getTimeBetweenEvictionRunsMillis, getUrl, getUseDisposableConnectionFacade, getUseLock, getUsername, getUseStatementFacade, getValidationInterval, getValidationQuery, getValidationQueryTimeout, getValidator, getValidatorClassName, isAccessToUnderlyingConnectionAllowed, isAlternateUsernameAllowed, isDefaultAutoCommit, isDefaultReadOnly, isFairQueue, isIgnoreExceptionOnPreLoad, isJmxEnabled, isLogAbandoned, isPoolSweeperEnabled, isRemoveAbandoned, isTestOnBorrow, isTestOnConnect, isTestOnReturn, isTestWhileIdle, isUseEquals, setAbandonWhenPercentageFull, setAccessToUnderlyingConnectionAllowed, setAlternateUsernameAllowed, setCommitOnReturn, setConnectionProperties, setDataSource, setDataSourceJNDI, setDbProperties, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setFairQueue, setIgnoreExceptionOnPreLoad, setInitialSize, setInitSQL, setJdbcInterceptors, setJmxEnabled, setLogAbandoned, setLogValidationErrors, setMaxActive, setMaxAge, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setName, setNumTestsPerEvictionRun, setPropagateInterruptState, setRemoveAbandoned, setRemoveAbandonedTimeout, setRollbackOnReturn, setSuspectTimeout, setTestOnBorrow, setTestOnConnect, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setUseDisposableConnectionFacade, setUseEquals, setUseLock, setUseStatementFacade, setValidationInterval, setValidationQuery, setValidationQueryTimeout, setValidator, setValidatorClassName, toStringpublic void setUsername(String username)
setUsername in interface org.apache.tomcat.jdbc.pool.PoolConfigurationsetUsername in class org.apache.tomcat.jdbc.pool.PoolPropertiespublic void setPassword(String password)
setPassword in interface org.apache.tomcat.jdbc.pool.PoolConfigurationsetPassword in class org.apache.tomcat.jdbc.pool.PoolPropertiespublic void setDriverClassName(String driverClassName)
setDriverClassName in interface org.apache.tomcat.jdbc.pool.PoolConfigurationsetDriverClassName in class org.apache.tomcat.jdbc.pool.PoolPropertiespublic void setUrl(String url)
setUrl in interface org.apache.tomcat.jdbc.pool.PoolConfigurationsetUrl in class org.apache.tomcat.jdbc.pool.PoolPropertiespublic void setDefaultTransactionIsolationName(String constantName)
public void setDatabasePlatformSupport(DatabasePlatformSupport databasePlatformSupport)
public org.apache.tomcat.jdbc.pool.DataSource createDataSource(DataSourceInformation dataSourceInformation)
DataSourceFactorycreateDataSource in interface DataSourceFactorydataSourceInformation - - the DataSourceInformation parameter object
which holds all dynamic information for the datasource creation.public void closeDataSource(DataSource dataSource)
DataSourceFactorycloseDataSource in interface DataSourceFactorydataSource - - The datasource that is not used anymore and can be destroyed by
the factoryCopyright © 2021 Pivotal Software, Inc.. All rights reserved.