Module org.firebirdsql.jaybird
Package org.firebirdsql.ds

# Class FBConnectionPoolDataSource

java.lang.Object
org.firebirdsql.ds.RootCommonDataSource
org.firebirdsql.ds.AbstractConnectionPropertiesDataSource
org.firebirdsql.ds.FBAbstractCommonDataSource
org.firebirdsql.ds.FBConnectionPoolDataSource

All Implemented Interfaces:
  `Referenceable`, `CommonDataSource`, `ConnectionPoolDataSource`, `AttachmentProperties`, `BaseProperties`, `DatabaseConnectionProperties`, `FirebirdConnectionProperties`

public class FBConnectionPoolDataSource extends FBAbstractCommonDataSource implements ConnectionPoolDataSource, Referenceable
Bare-bones implementation of `ConnectionPoolDataSource`.

Please be aware that this is not a connectionpool. This class provides PooledConnection objects for connection pool implementations (eg as provided by a JEE application server). If you need a standalone connectionpool, consider using a connectionpool implementation like HikariCP, c3p0 or DBCP.

Since:
  2.2
Author:
  Mark Rotteveel

## Field Summary

### Fields inherited from class org.firebirdsql.ds.FBAbstractCommonDataSource

`REF_DESCRIPTION, REF_PROPERTIES`

## Constructor Summary

Constructors
Constructor
Description
`FBConnectionPoolDataSource()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`checkNotStarted()`
Method to check if this DataSource has not yet started.
`PooledConnection`
`getPooledConnection()`
`PooledConnection`
`getPooledConnection(String user, String password)`
`Reference`
`getReference()`

### Methods inherited from class org.firebirdsql.ds.FBAbstractCommonDataSource

`connectionPropertyValues, getBooleanProperty, getConnectionProperties, getDescription, getIntProperty, getProperty, getTransactionParameters, setBooleanProperty, setConnectionProperties, setDescription, setIntProperty, setNonStandardProperty, setProperty, setTransactionParameters, updateReference, withLock`

### Methods inherited from class org.firebirdsql.ds.AbstractConnectionPropertiesDataSource

`getAuthPlugins, getBlobBufferSize, getCharSet, getConnectTimeout, getDatabaseName, getDataTypeBind, getDbCryptConfig, getDecfloatRound, getDecfloatTraps, getDefaultIsolation, getDefaultTransactionIsolation, getEnableProtocol, getEncoding, getGeneratedKeysEnabled, getLoginTimeout, getPageCacheSize, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getReportSQLWarnings, getRoleName, getScrollableCursor, getServerBatchBufferSize, getServerName, getSessionTimeZone, getSocketBufferSize, getSoTimeout, getSqlDialect, getTpbMapping, getType, getUser, getUserName, getWireCrypt, isAllowTxStmts, isColumnLabelForName, isCreateDatabaseIfNotExist, isDefaultResultSetHoldable, isExtendedMetadata, isIgnoreProcedureType, isUseCatalogAsPackage, isUseFirebirdAutocommit, isUseServerBatch, isUseStreamBlobs, isWireCompression, setAllowTxStmts, setAuthPlugins, setBlobBufferSize, setCharSet, setColumnLabelForName, setConnectTimeout, setCreateDatabaseIfNotExist, setDatabaseName, setDataTypeBind, setDbCryptConfig, setDecfloatRound, setDecfloatTraps, setDefaultIsolation, setDefaultResultSetHoldable, setDefaultTransactionIsolation, setEnableProtocol, setEncoding, setExtendedMetadata, setGeneratedKeysEnabled, setIgnoreProcedureType, setLoginTimeout, setPageCacheSize, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setReportSQLWarnings, setRoleName, setScrollableCursor, setServerBatchBufferSize, setServerName, setSessionTimeZone, setSocketBufferSize, setSoTimeout, setSqlDialect, setTpbMapping, setType, setUseCatalogAsPackage, setUseFirebirdAutocommit, setUser, setUserName, setUseServerBatch, setUseStreamBlobs, setWireCompression, setWireCrypt`

### Methods inherited from class org.firebirdsql.ds.RootCommonDataSource

`getLogWriter, getParentLogger, setLogWriter`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.firebirdsql.jaybird.props.BaseProperties

`getBooleanProperty, getIntProperty, getProperty`

### Methods inherited from interface javax.sql.CommonDataSource

`createShardingKeyBuilder, getParentLogger`

### Methods inherited from interface javax.sql.ConnectionPoolDataSource

`createPooledConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter`

## Constructor Details

### FBConnectionPoolDataSource

public FBConnectionPoolDataSource()

## Method Details

### getPooledConnection

public PooledConnection getPooledConnection() throws SQLException

Specified by:
  `getPooledConnection` in interface `ConnectionPoolDataSource`
Throws:
  `SQLException`

### getPooledConnection

public PooledConnection getPooledConnection(String user, String password) throws SQLException

Specified by:
  `getPooledConnection` in interface `ConnectionPoolDataSource`
Throws:
  `SQLException`

### checkNotStarted

protected void checkNotStarted()
Description copied from class: `FBAbstractCommonDataSource`
Method to check if this DataSource has not yet started.

Implementations should throw IllegalStateException when the DataSource is already in use and modifying properties is not allowed.

Specified by:
  `checkNotStarted` in class `FBAbstractCommonDataSource`

### getReference

public Reference getReference() throws NamingException

Specified by:
  `getReference` in interface `Referenceable`
Throws:
  `NamingException`