org.firebirdsql.ds

## Class FBConnectionPoolDataSource

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

- All Implemented Interfaces:
    javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, FirebirdConnectionProperties

      public class FBConnectionPoolDataSource
      extends FBAbstractCommonDataSource
      implements javax.sql.ConnectionPoolDataSource, javax.naming.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 c3p0, BoneCP or DBCP.

  Since:
    2.2
  Author:
    Mark Rotteveel

- - ### Field Summary

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

      `lock, REF_DATABASE_NAME, REF_DESCRIPTION, REF_PORT_NUMBER, REF_PROPERTIES, REF_SERVER_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FBConnectionPoolDataSource()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkNotStarted()` Method to check if this DataSource has not yet started.
    `javax.sql.PooledConnection` | `getPooledConnection()`
    `javax.sql.PooledConnection` | `getPooledConnection(java.lang.String user, java.lang.String password)`
    `javax.naming.Reference` | `getReference()`

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

      `getBlobBufferSize, getBuffersNumber, getCharSet, getConnectionProperties, getConnectTimeout, getDatabase, getDatabaseName, getDatabaseParameterBuffer, getDbCryptConfig, getDefaultIsolation, getDefaultTransactionIsolation, getDescription, getEncoding, getLoginTimeout, getNonStandardProperty, getPassword, getPortNumber, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getSqlDialect, getTpbMapping, getTransactionParameters, getType, getUser, getUserName, getUseTranslation, getWireCrypt, isDefaultResultSetHoldable, isIgnoreProcedureType, isTimestampUsesLocalTimezone, isUseFirebirdAutocommit, isUseStandardUdf, isUseStreamBlobs, setBlobBufferSize, setBuffersNumber, setCharSet, setConnectionProperties, setConnectTimeout, setDatabase, setDatabase, setDatabaseName, setDbCryptConfig, setDefaultIsolation, setDefaultResultSetHoldable, setDefaultTransactionIsolation, setDescription, setEncoding, setIgnoreProcedureType, setLoginTimeout, setNonStandardProperty, setNonStandardProperty, setPassword, setPortNumber, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setSqlDialect, setTimestampUsesLocalTimezone, setTpbMapping, setTransactionParameters, setType, setUseFirebirdAutocommit, setUser, setUserName, setUseStandardUdf, setUseStreamBlobs, setUseTranslation, setWireCrypt, updateReference`

    - ### 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 javax.sql.CommonDataSource

      `getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriter`

- - ### Constructor Detail

    - #### FBConnectionPoolDataSource

          public FBConnectionPoolDataSource()

  - ### Method Detail

    - #### getPooledConnection

          public javax.sql.PooledConnection getPooledConnection()
                                                         throws java.sql.SQLException

      Specified by:
        `getPooledConnection` in interface `javax.sql.ConnectionPoolDataSource`
      Throws:
        `java.sql.SQLException`

    - #### getPooledConnection

          public javax.sql.PooledConnection getPooledConnection(java.lang.String user,
                                                       java.lang.String password)
                                                         throws java.sql.SQLException

      Specified by:
        `getPooledConnection` in interface `javax.sql.ConnectionPoolDataSource`
      Throws:
        `java.sql.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 javax.naming.Reference getReference()
                                              throws javax.naming.NamingException

      Specified by:
        `getReference` in interface `javax.naming.Referenceable`
      Throws:
        `javax.naming.NamingException`

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.