Class FBConnectionPoolDataSource

  • All Implemented Interfaces:
    javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, AttachmentProperties, BaseProperties, DatabaseConnectionProperties, 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 HikariCP, c3p0 or DBCP.

    Since:
    2.2
    Author:
    Mark Rotteveel
    • 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