public class PGConnectionPoolDataSource extends BaseDataSource implements ConnectionPoolDataSource, 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 and Description |
|---|
PGConnectionPoolDataSource() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Gets a description of this DataSource.
|
PooledConnection |
getPooledConnection()
Gets a connection which may be pooled by the app server or middleware implementation of
DataSource.
|
PooledConnection |
getPooledConnection(String user,
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, getCleanupSavepoints, getConnection, getConnection, getConnectTimeout, getCurrentSchema, getDatabaseMetadataCacheFields, getDatabaseMetadataCacheFieldsMiB, getDatabaseName, getDefaultRowFetchSize, getDisableColumnSanitiser, getGssLib, getHostRecheckSeconds, getJaasApplicationName, getJaasLogin, getKerberosServerName, getLoadBalanceHosts, getLoggerFile, getLoggerLevel, getLoginTimeout, getLogUnclosedConnections, getLogWriter, getOptions, getParentLogger, getPassword, getPortNumber, getPreferQueryMode, getPreparedStatementCacheQueries, getPreparedStatementCacheSizeMiB, getPrepareThreshold, getProperty, getProperty, getProtocolVersion, getReadOnly, getReceiveBufferSize, getRecvBufferSize, getReference, getReplication, getReWriteBatchedInserts, getSendBufferSize, getServerName, getSocketFactory, getSocketFactoryArg, getSocketTimeout, getSsl, getSslcert, getSslCert, getSslfactory, getSslfactoryarg, getSslFactoryArg, getSslhostnameverifier, getSslHostnameVerifier, getSslkey, getSslKey, getSslmode, getSslMode, getSslpassword, getSslPassword, getSslpasswordcallback, getSslPasswordCallback, getSslrootcert, getSslRootCert, getSspiServiceClass, getStringType, getTargetServerType, getTcpKeepAlive, getUnknownLength, getUrl, getURL, getUser, getUseSpNego, initializeFrom, isAllowEncodingChanges, isCleanupSavePoints, isColumnSanitiserDisabled, isDisableColumnSanitiser, isLoadBalanceHosts, isLogUnclosedConnections, isReadOnly, isReWriteBatchedInserts, isSsl, isTcpKeepAlive, readBaseObject, setAllowEncodingChanges, setApplicationName, setAssumeMinServerVersion, setAutosave, setBinaryTransfer, setBinaryTransferDisable, setBinaryTransferEnable, setCancelSignalTimeout, setCleanupSavepoints, setCleanupSavePoints, setConnectTimeout, setCurrentSchema, setDatabaseMetadataCacheFields, setDatabaseMetadataCacheFieldsMiB, setDatabaseName, setDefaultRowFetchSize, setDisableColumnSanitiser, setFromReference, setGssLib, setHostRecheckSeconds, setJaasApplicationName, setJaasLogin, setKerberosServerName, setLoadBalanceHosts, setLoggerFile, setLoggerLevel, setLoginTimeout, setLogUnclosedConnections, setLogWriter, setOptions, setPassword, setPortNumber, setPreferQueryMode, setPreparedStatementCacheQueries, setPreparedStatementCacheSizeMiB, setPrepareThreshold, setProperty, setProperty, setProtocolVersion, setReadOnly, setReceiveBufferSize, setRecvBufferSize, setReplication, setReWriteBatchedInserts, setSendBufferSize, setServerName, setSocketFactory, setSocketFactoryArg, setSocketTimeout, setSsl, setSslcert, setSslCert, setSslfactory, setSslfactoryarg, setSslFactoryArg, setSslhostnameverifier, setSslHostnameVerifier, setSslkey, setSslKey, setSslmode, setSslMode, setSslpassword, setSslPassword, setSslpasswordcallback, setSslPasswordCallback, setSslrootcert, setSslRootCert, setSspiServiceClass, setStringType, setTargetServerType, setTcpKeepAlive, setUnknownLength, setUrl, setURL, setUser, setUseSpNego, writeBaseObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterpublic String getDescription()
getDescription in class BaseDataSourcepublic PooledConnection getPooledConnection() throws SQLException
getPooledConnection in interface ConnectionPoolDataSourcePooledConnection object that is a physical
connection to the database that this
ConnectionPoolDataSource object representsSQLException - Occurs when the physical database connection cannot be
established.public PooledConnection getPooledConnection(String user, String password) throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceuser - the database user on whose behalf the connection is being madepassword - the user's passwordPooledConnection object that is a physical
connection to the database that this
ConnectionPoolDataSource object representsSQLException - 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 © 2019 PostgreSQL Global Development Group. All rights reserved.