Class BasicClientConnectionPoolDataSource40

  • All Implemented Interfaces:
    java.io.Serializable, java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource, org.apache.derby.jdbc.ClientConnectionPoolDataSourceInterface, org.apache.derby.jdbc.ClientDataSourceInterface

    public class BasicClientConnectionPoolDataSource40
    extends BasicClientDataSource40
    implements javax.sql.ConnectionPoolDataSource, org.apache.derby.jdbc.ClientConnectionPoolDataSourceInterface
    This data source is suitable for client/server use of Derby, running on Java 8 Compact Profile 2 or higher.

    BasicClientConnectionPoolDataSource40 is similar to ClientConnectionPoolDataSource except that it does not support JNDI, i.e. it does not implement javax.naming.Referenceable.

    See Also:
    ClientConnectionPoolDataSource40, Serialized Form
    • Constructor Detail

      • BasicClientConnectionPoolDataSource40

        public BasicClientConnectionPoolDataSource40()
    • Method Detail

      • getPooledConnection

        public javax.sql.PooledConnection getPooledConnection()
                                                       throws java.sql.SQLException
        Specified by:
        getPooledConnection in interface javax.sql.ConnectionPoolDataSource
        Throws:
        java.sql.SQLException
        See Also:
        ConnectionPoolDataSource.getPooledConnection()
      • 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
        See Also:
        ConnectionPoolDataSource.getPooledConnection( java.lang.String, java.lang.String)
      • setMaxStatements

        public void setMaxStatements​(int maxStatements)
        Specifies the maximum size of the statement cache.
        Specified by:
        setMaxStatements in interface org.apache.derby.jdbc.ClientConnectionPoolDataSourceInterface
        Parameters:
        maxStatements - maximum number of cached statements
        Throws:
        java.lang.IllegalArgumentException - if maxStatements is negative
      • getMaxStatements

        public int getMaxStatements()
        Returns the maximum number of JDBC prepared statements a connection is allowed to cache.
        Specified by:
        getMaxStatements in interface org.apache.derby.jdbc.ClientConnectionPoolDataSourceInterface
        Returns:
        Maximum number of statements to cache, or 0 if caching is disabled (default).