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.
|
Logger |
getParentLogger() |
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, getBinaryTransfer, getBinaryTransferDisable, getBinaryTransferEnable, getCharset, getCompatible, getConnection, getConnection, getConnectTimeout, getCurrentSchema, getDatabaseName, getDefaultRowFetchSize, getDisableColumnSanitiser, getGssLib, getHostRecheckSeconds, getJaasApplicationName, getKerberosServerName, getLoadBalanceHosts, getLoginTimeout, getLoglevel, getLogLevel, getLogUnclosedConnections, getLogWriter, getPassword, getPortNumber, getPreparedStatementCacheQueries, getPreparedStatementCacheSizeMiB, getPrepareThreshold, getProperty, getProperty, getProtocolVersion, getReadOnly, getReceiveBufferSize, getReference, getSendBufferSize, getServerName, getSocketTimeout, getSsl, getSslCert, getSslfactory, getSslFactoryArg, getSslHostnameVerifier, getSslKey, getSslMode, getSslPassword, getSslPasswordCallback, getSslRootCert, getSspiServiceClass, getStringType, getTargetServerType, getTcpKeepAlive, getUnknownLength, getUrl, getUser, getUseSpNego, initializeFrom, isColumnSanitiserDisabled, readBaseObject, setAllowEncodingChanges, setApplicationName, setAssumeMinServerVersion, setBinaryTransfer, setBinaryTransferDisable, setBinaryTransferEnable, setCharset, setCompatible, setConnectTimeout, setCurrentSchema, setDatabaseName, setDefaultRowFetchSize, setDisableColumnSanitiser, setFromReference, setGssLib, setHostRecheckSeconds, setJaasApplicationName, setKerberosServerName, setLoadBalanceHosts, setLoginTimeout, setLoglevel, setLogLevel, setLogUnclosedConnections, setLogWriter, setPassword, setPortNumber, setPreparedStatementCacheQueries, setPreparedStatementCacheSizeMiB, setPrepareThreshold, setProperty, setProperty, setProtocolVersion, setReadOnly, setReceiveBufferSize, setSendBufferSize, setServerName, setSocketTimeout, setSsl, setSslCert, setSslfactory, setSslFactoryArg, setSslHostnameVerifier, setSslKey, setSslMode, setSslPassword, setSslPasswordCallback, setSslRootCert, setSspiServiceClass, setStringType, setTargetServerType, setTcpKeepAlive, setUnknownLength, setUrl, setUser, setUseSpNego, writeBaseObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
public String getDescription()
getDescription
in class BaseDataSource
public PooledConnection getPooledConnection() throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
SQLException
- Occurs when the physical database connection cannot be established.public PooledConnection getPooledConnection(String user, String password) throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
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 autoCommitpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
Copyright © 2016 PostgreSQL Global Development Group. All rights reserved.