Class UCPDataSource
- java.lang.Object
-
- oracle.ucp.jdbc.UCPDataSource
-
- All Implemented Interfaces:
java.sql.Wrapper
,javax.sql.CommonDataSource
,javax.sql.DataSource
,org.springframework.beans.factory.InitializingBean
@Deprecated @Configuration @ConfigurationProperties("spring.datasource.ucp") public class UCPDataSource extends java.lang.Object implements javax.sql.DataSource, org.springframework.beans.factory.InitializingBean
Deprecated.This decorator of
PoolDataSource
allows UCP to be configured as the pooled datasource in Spring Boot applications using Autoconfigure.In order for Spring to use this data source, the following attribute needs to be set:
spring.datasource.type=oracle.ucp.jdbc.UCPDataSource
Spring injects both camel-case notation or slash separated. Eg: both maxPoolSize and max-pool-size will update maxPoolSize attribute.
Common attributes with other connection pool implementors:
- spring.datasource.url
- spring.datasource.username
- spring.datasource.password
- spring.datasource.driver-class-name
Common attribute, to use this bean:
- spring.datasource.type=oracle.ucp.jdbc.UCPDataSource
Non-optional attribute, specific to UCP:
- spring.datasource.ucp.connection-factory-class-name
Optional attributes, specific to UCP:
- spring.datasource.ucp.server-name
- spring.datasource.ucp.port-number
- spring.datasource.ucp.database-name
- spring.datasource.ucp.data-source-name
- spring.datasource.ucp.description
- spring.datasource.ucp.network-protocol
- spring.datasource.ucp.role-name
- spring.datasource.ucp.validate-connection-on-borrow
- spring.datasource.ucp.sql-for-validate-connection
- spring.datasource.ucp.connection-pool-name
- spring.datasource.ucp.initial-pool-size
- spring.datasource.ucp.min-pool-size
- spring.datasource.ucp.max-pool-size
- spring.datasource.ucp.abandoned-connection-timeout
- spring.datasource.ucp.time-to-live-connection-timeout
- spring.datasource.ucp.inactive-connection-timeout
- spring.datasource.ucp.max-idle-time
- spring.datasource.ucp.timeout-check-interval
- spring.datasource.ucp.property-cycle
- spring.datasource.ucp.max-statements
- spring.datasource.ucp.connection-wait-timeout
- spring.datasource.ucp.max-connection-reuse-time
- spring.datasource.ucp.max-connection-reuse-count
- spring.datasource.ucp.connection-harvest-trigger-count
- spring.datasource.ucp.connection-harvest-max-count
- spring.datasource.ucp.fast-connection-fail-over-enabled
- spring.datasource.ucp.ons-configuration
- spring.datasource.ucp.seconds-to-trust-idle-connection
- spring.datasource.ucp.login-timeout
- spring.datasource.ucp.connection-labeling-high-cost
- spring.datasource.ucp.connection-repurpose-threshold
- spring.datasource.ucp.high-cost-connection-reuse-threshold
- spring.datasource.ucp.max-connections-per-shard
- spring.datasource.ucp.sharding-mode
- spring.datasource.ucp.connection-validation-timeout
This feature is now deprecated in 23ai, please use spring boot version 2.4 or higher, to use the auto-configure feature in spring boot, use
spring.datasource.type=oracle.ucp.jdbc.PoolDataSource
and rest of the ucp properties can be set similarly using 'spring.datasource.oracleucp' prefix
-
-
Constructor Summary
Constructors Constructor Description UCPDataSource()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
afterPropertiesSet()
Deprecated.After the bean has all its properties injected, this method creates thePoolDataSource
decorated instance.javax.sql.DataSource
datasource()
Deprecated.Returns the datasource@Bean
reference.java.sql.Connection
getConnection()
Deprecated.java.sql.Connection
getConnection(java.lang.String username, java.lang.String password)
Deprecated.int
getLoginTimeout()
Deprecated.java.io.PrintWriter
getLogWriter()
Deprecated.java.util.logging.Logger
getParentLogger()
Deprecated.PoolDataSource
getPoolDataSource()
Deprecated.Returns the reference to the instantiatedPoolDataSource
.boolean
isWrapperFor(java.lang.Class<?> iface)
Deprecated.void
setAbandonedConnectionTimeout(int abandonedConnectionTimeout)
Deprecated.void
setConnectionFactoryClassName(java.lang.String connectionFactoryClassName)
Deprecated.void
setConnectionHarvestMaxCount(int connectionHarvestMaxCount)
Deprecated.void
setConnectionHarvestTriggerCount(int connectionHarvestTriggerCount)
Deprecated.void
setConnectionLabelingHighCost(int connectionLabelingHighCost)
Deprecated.void
setConnectionPoolName(java.lang.String connectionPoolName)
Deprecated.void
setConnectionRepurposeThreshold(int connectionRepurposeThreshold)
Deprecated.void
setConnectionValidationTimeout(int connectionValidationTimeout)
Deprecated.void
setConnectionWaitTimeout(int connectionWaitTimeout)
Deprecated.void
setDatabaseName(java.lang.String databaseName)
Deprecated.void
setDataSourceName(java.lang.String dataSourceName)
Deprecated.void
setDescription(java.lang.String description)
Deprecated.void
setFastConnectionFailoverEnabled(boolean fastConnectionFailoverEnabled)
Deprecated.void
setHighCostConnectionReuseThreshold(int highCostConnectionReuseThreshold)
Deprecated.void
setInactiveConnectionTimeout(int inactiveConnectionTimeout)
Deprecated.void
setInitialPoolSize(int initialPoolSize)
Deprecated.void
setLoginTimeout(int loginTimeout)
Deprecated.void
setLogWriter(java.io.PrintWriter out)
Deprecated.void
setMaxConnectionReuseCount(int maxConnectionReuseCount)
Deprecated.void
setMaxConnectionReuseTime(int maxConnectionReuseTime)
Deprecated.void
setMaxConnectionsPerShard(int maxConnectionsPerShard)
Deprecated.void
setMaxIdleTime(int maxIdleTime)
Deprecated.void
setMaxPoolSize(int maxPoolSize)
Deprecated.void
setMaxStatements(int maxStatements)
Deprecated.void
setMinIdle(int minIdle)
Deprecated.void
setMinPoolSize(int minPoolSize)
Deprecated.void
setNetworkProtocol(java.lang.String networkProtocol)
Deprecated.void
setONSConfiguration(java.lang.String onsConfiguration)
Deprecated.void
setPortNumber(int portNumber)
Deprecated.void
setPropertyCycle(int propertyCycle)
Deprecated.void
setRoleName(java.lang.String roleName)
Deprecated.void
setSecondsToTrustIdleConnection(int secondsToTrustIdleConnection)
Deprecated.void
setServerName(java.lang.String serverName)
Deprecated.void
setShardingMode(boolean shardingMode)
Deprecated.void
setSQLForValidateConnection(java.lang.String sqlForValidateConnection)
Deprecated.void
setTimeoutCheckInterval(int timeoutCheckInterval)
Deprecated.void
setTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout)
Deprecated.void
setValidateConnectionOnBorrow(boolean validateConnectionOnBorrow)
Deprecated.<T> T
unwrap(java.lang.Class<T> iface)
Deprecated.
-
-
-
Method Detail
-
datasource
@Bean public javax.sql.DataSource datasource()
Deprecated.Returns the datasource@Bean
reference. This is picked-up automatically by other Spring beans, in particulary (JdbTemplate @Bean).- Returns:
- datasource @Bean reference.
-
getPoolDataSource
public PoolDataSource getPoolDataSource()
Deprecated.Returns the reference to the instantiatedPoolDataSource
. After initialization, interaction with the pool is through this method.- Returns:
- poolDataSource reference.
-
afterPropertiesSet
public void afterPropertiesSet() throws java.sql.SQLException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
Deprecated.After the bean has all its properties injected, this method creates thePoolDataSource
decorated instance.- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.sql.SQLException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
-
setConnectionFactoryClassName
public void setConnectionFactoryClassName(java.lang.String connectionFactoryClassName)
Deprecated.
-
setServerName
public void setServerName(java.lang.String serverName) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setPortNumber
public void setPortNumber(int portNumber) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setDatabaseName
public void setDatabaseName(java.lang.String databaseName) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setDataSourceName
public void setDataSourceName(java.lang.String dataSourceName) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setDescription
public void setDescription(java.lang.String description) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setNetworkProtocol
public void setNetworkProtocol(java.lang.String networkProtocol) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setRoleName
public void setRoleName(java.lang.String roleName) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setValidateConnectionOnBorrow
public void setValidateConnectionOnBorrow(boolean validateConnectionOnBorrow) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setSQLForValidateConnection
public void setSQLForValidateConnection(java.lang.String sqlForValidateConnection) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setConnectionPoolName
public void setConnectionPoolName(java.lang.String connectionPoolName) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setInitialPoolSize
public void setInitialPoolSize(int initialPoolSize) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMinPoolSize
public void setMinPoolSize(int minPoolSize) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMinIdle
public void setMinIdle(int minIdle) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setAbandonedConnectionTimeout
public void setAbandonedConnectionTimeout(int abandonedConnectionTimeout) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setTimeToLiveConnectionTimeout
public void setTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setInactiveConnectionTimeout
public void setInactiveConnectionTimeout(int inactiveConnectionTimeout) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setTimeoutCheckInterval
public void setTimeoutCheckInterval(int timeoutCheckInterval) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setPropertyCycle
public void setPropertyCycle(int propertyCycle) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMaxStatements
public void setMaxStatements(int maxStatements) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setConnectionWaitTimeout
public void setConnectionWaitTimeout(int connectionWaitTimeout) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMaxConnectionReuseTime
public void setMaxConnectionReuseTime(int maxConnectionReuseTime) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMaxConnectionReuseCount
public void setMaxConnectionReuseCount(int maxConnectionReuseCount) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setConnectionHarvestTriggerCount
public void setConnectionHarvestTriggerCount(int connectionHarvestTriggerCount) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setConnectionHarvestMaxCount
public void setConnectionHarvestMaxCount(int connectionHarvestMaxCount) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setFastConnectionFailoverEnabled
public void setFastConnectionFailoverEnabled(boolean fastConnectionFailoverEnabled) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setONSConfiguration
public void setONSConfiguration(java.lang.String onsConfiguration) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setSecondsToTrustIdleConnection
public void setSecondsToTrustIdleConnection(int secondsToTrustIdleConnection) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setConnectionLabelingHighCost
public void setConnectionLabelingHighCost(int connectionLabelingHighCost) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setConnectionRepurposeThreshold
public void setConnectionRepurposeThreshold(int connectionRepurposeThreshold) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setHighCostConnectionReuseThreshold
public void setHighCostConnectionReuseThreshold(int highCostConnectionReuseThreshold) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setMaxConnectionsPerShard
public void setMaxConnectionsPerShard(int maxConnectionsPerShard) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setShardingMode
public void setShardingMode(boolean shardingMode) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
setConnectionValidationTimeout
public void setConnectionValidationTimeout(int connectionValidationTimeout) throws java.lang.NoSuchMethodException, java.lang.SecurityException
Deprecated.- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
getParentLogger
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
Deprecated.- Specified by:
getParentLogger
in interfacejavax.sql.CommonDataSource
- Throws:
java.sql.SQLFeatureNotSupportedException
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
Deprecated.- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
Deprecated.- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
Deprecated.- Specified by:
getConnection
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
Deprecated.- Specified by:
getConnection
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
getLogWriter
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
Deprecated.- Specified by:
getLogWriter
in interfacejavax.sql.CommonDataSource
- Specified by:
getLogWriter
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
setLogWriter
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
Deprecated.- Specified by:
setLogWriter
in interfacejavax.sql.CommonDataSource
- Specified by:
setLogWriter
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
setLoginTimeout
public void setLoginTimeout(int loginTimeout) throws java.sql.SQLException
Deprecated.- Specified by:
setLoginTimeout
in interfacejavax.sql.CommonDataSource
- Specified by:
setLoginTimeout
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException
Deprecated.- Specified by:
getLoginTimeout
in interfacejavax.sql.CommonDataSource
- Specified by:
getLoginTimeout
in interfacejavax.sql.DataSource
- Throws:
java.sql.SQLException
-
-