java.io.Serializable
, javax.naming.Referenceable
, javax.sql.CommonDataSource
, javax.sql.ConnectionPoolDataSource
ConnectionPool
, Jdbc3ConnectionPool
public class PGConnectionPoolDataSource extends BaseDataSource implements javax.sql.ConnectionPoolDataSource, java.io.Serializable
In any case, in order to use this ConnectionPoolDataSource, you must set the property databaseName. The settings for serverName, portNumber, user, and password are optional. Note: these properties are declared in the superclass.
This implementation supports JDK 1.3 and higher.
Constructor | Description |
---|---|
PGConnectionPoolDataSource() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getDescription() |
Gets a description of this DataSource.
|
javax.sql.PooledConnection |
getPooledConnection() |
Gets a connection which may be pooled by the app server or middleware implementation of
DataSource.
|
javax.sql.PooledConnection |
getPooledConnection(java.lang.String user,
java.lang.String password) |
Gets a connection which may be pooled by the app server or middleware implementation of
DataSource.
|
boolean |
isDefaultAutoCommit() |
Gets whether connections supplied by this pool will have autoCommit turned on by default.
|
void |
setDefaultAutoCommit(boolean defaultAutoCommit) |
Sets whether connections supplied by this pool will have autoCommit turned on by default.
|
createReference, getAllowEncodingChanges, getApplicationName, getAssumeMinServerVersion, getAutosave, getBinaryTransfer, getBinaryTransferDisable, getBinaryTransferEnable, getCancelSignalTimeout, getConnection, getConnection, getConnectTimeout, getCurrentSchema, getDatabaseMetadataCacheFields, getDatabaseMetadataCacheFieldsMiB, getDatabaseName, getDefaultRowFetchSize, getDisableColumnSanitiser, getGssLib, getHostRecheckSeconds, getJaasApplicationName, getJaasLogin, getKerberosServerName, getLoadBalanceHosts, getLoggerFile, getLoggerLevel, getLoginTimeout, getLogUnclosedConnections, getLogWriter, getParentLogger, getPassword, getPortNumber, getPreferQueryMode, getPreparedStatementCacheQueries, getPreparedStatementCacheSizeMiB, getPrepareThreshold, getProperty, getProperty, getProtocolVersion, getReadOnly, getReceiveBufferSize, getReference, getReplication, getReWriteBatchedInserts, getSendBufferSize, getServerName, getSocketFactory, getSocketFactoryArg, getSocketTimeout, getSsl, getSslCert, getSslfactory, getSslFactoryArg, getSslHostnameVerifier, getSslKey, getSslMode, getSslPassword, getSslPasswordCallback, getSslRootCert, getSspiServiceClass, getStringType, getTargetServerType, getTcpKeepAlive, getUnknownLength, getUrl, getURL, getUser, getUseSpNego, initializeFrom, isColumnSanitiserDisabled, readBaseObject, setAllowEncodingChanges, setApplicationName, setAssumeMinServerVersion, setAutosave, setBinaryTransfer, setBinaryTransferDisable, setBinaryTransferEnable, setCancelSignalTimeout, setConnectTimeout, setCurrentSchema, setDatabaseMetadataCacheFields, setDatabaseMetadataCacheFieldsMiB, setDatabaseName, setDefaultRowFetchSize, setDisableColumnSanitiser, setFromReference, setGssLib, setHostRecheckSeconds, setJaasApplicationName, setJaasLogin, setKerberosServerName, setLoadBalanceHosts, setLoggerFile, setLoggerLevel, setLoginTimeout, setLogUnclosedConnections, setLogWriter, setPassword, setPortNumber, setPreferQueryMode, setPreparedStatementCacheQueries, setPreparedStatementCacheSizeMiB, setPrepareThreshold, setProperty, setProperty, setProtocolVersion, setReadOnly, setReceiveBufferSize, setReplication, setReWriteBatchedInserts, setSendBufferSize, setServerName, setSocketFactory, setSocketFactoryArg, setSocketTimeout, setSsl, setSslCert, setSslfactory, setSslFactoryArg, setSslHostnameVerifier, setSslKey, setSslMode, setSslPassword, setSslPasswordCallback, setSslRootCert, setSspiServiceClass, setStringType, setTargetServerType, setTcpKeepAlive, setUnknownLength, setUrl, setURL, setUser, setUseSpNego, writeBaseObject
createShardingKeyBuilder, getParentLogger
public java.lang.String getDescription()
getDescription
in class BaseDataSource
public javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
- Occurs when the physical database connection cannot be
established.public javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
- Occurs when the physical database connection cannot be
established.public boolean isDefaultAutoCommit()
public void setDefaultAutoCommit(boolean defaultAutoCommit)
defaultAutoCommit
- whether connections supplied by this pool will have autoCommitCopyright © 2018 PostgreSQL Global Development Group. All rights reserved.