org.firebirdsql.pool

Class FBWrappingDataSource

Implemented Interfaces:
DataSource, ObjectFactory, Referenceable, Serializable, ConnectionPoolConfiguration, FirebirdConnectionProperties, FirebirdPool

public class FBWrappingDataSource
extends java.lang.Object
implements DataSource, ObjectFactory, Referenceable, Serializable, FirebirdPool

Implementation of javax.sql.DataSource including connection pooling. Following properties are supported:
  • loginTimeout property from javax.sql.DataSource, in this context is a synonym for blockingTimeout (however value is specified in seconds).
  • maxIdleTime time in milliseconds after which idle physical connection in the pool is closed.
  • maxStatements maximum number of pooled prepared statements, if 0, pooling is switched off.
  • maxPoolSize maximum number of physical connections that can be opened by this data source.
  • minPoolSize minimum number of connections that will remain open by this data source.
  • nonStandardProperty a non-standard connection parameter in form name[=value].
  • password password that is used to connect to database.
  • pingInterval time interval during which connection will be proved for aliveness.
  • pooling allows switching pooling off.
  • statementPooling alternative way to switch statement pooling off.
  • socketBufferSize size of the socket buffer in bytes. In some cases values used by JVM by default are not optimal. This results in performance degradation (especially when you transfer big BLOBs). Usually 8192 bytes provides good results.
  • roleName SQL role name.
  • tpbMapping mapping of the TPB parameters to JDBC transaction isolation levels.
  • transactionIsolationLevel default transaction isolation level, number from java.sql.Connection interface.
  • totalSize total number of allocated connections.
  • type type of connection that will be created. There are four possible types: pure Java (or type 4), type 2 that will use Firebird client library to connect to the database, local-mode type 2 driver, and embedded that will use embedded engine (access to local databases). Possible values are (case insensitive):
  • userName name of the user that will be used to access the database.
  • workingSize number of connections that are in use (e.g. were obtained using getConnection() method, but not yet closed).
  • Author:
    Roman Rokytskyy

    Constructor Summary

    FBWrappingDataSource()
    Create instance of this class.

    Method Summary

    protected void
    finalize()
    Finalize this instance.
    int
    getBlobBufferSize()
    int
    getBlockingTimeout()
    Get time during which javax.sql.ConnectionPoolDataSource.getPooledConnection() can block.
    int
    getBuffersNumber()
    String
    getCharSet()
    Connection
    getConnection()
    Get JDBC connection from this data source.
    Connection
    getConnection(String user, String password)
    Get JDBC connection for the specified user name and password.
    int
    getConnectionCount()
    Deprecated. Confusing name.
    String
    getDatabase()
    DatabaseParameterBuffer
    getDatabaseParameterBuffer()
    Get the database parameter buffer corresponding to the current connection request information.
    String
    getDefaultIsolation()
    Get the default transaction isolation level as string.
    Reference
    getDefaultReference()
    Get default JNDI reference for this datasource.
    int
    getDefaultTransactionIsolation()
    Get the default transaction isolation level.
    String
    getDescription()
    String
    getEncoding()
    int
    getFreeSize()
    int
    getIdleTimeout()
    Deprecated. non-standard name, use getMaxIdleTime().
    String
    getIsolation()
    Deprecated. Use getDefaultIsolation() instead.
    PrintWriter
    getLogWriter()
    Get log writer.
    int
    getLoginTimeout()
    Get login timeout.
    int
    getMaxConnections()
    Deprecated. non-standard name, use getMaxPoolSize().
    int
    getMaxIdleTime()
    Get time after which idle connections will be deallocated.
    int
    getMaxPoolSize()
    Get maximum number of physical connections that can be simultaneously open.
    int
    getMaxStatements()
    int
    getMinConnections()
    Deprecated. non-standard name, use getMinPoolSize()
    int
    getMinPoolSize()
    Get minimum number of open JDBC connections that will be created when pool is started.
    String
    getNonStandardProperty(String key)
    Get the property that does not have corresponding getter method by its name.
    Object
    getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment)
    Get object instance for the specified name in the specified context.
    String
    getPassword()
    int
    getPingInterval()
    Get time interval after which connection should be pinged.
    String
    getPingStatement()
    Get SQL statement that will be used to ping connection.
    boolean
    getPooling()
    Deprecated. use isPooling() method.
    Reference
    getReference()
    Get JDNI reference.
    int
    getRetryInterval()
    Get interval of getting connections retries.
    String
    getRoleName()
    int
    getSocketBufferSize()
    String
    getSqlDialect()
    String
    getSqlRole()
    Deprecated. please use getRoleName() instead.
    int
    getTotalSize()
    String
    getTpbMapping()
    Get the used TPB mapping.
    int
    getTransactionIsolationLevel()
    Deprecated. Use getDefaultTransactionIsolation() instead.
    TransactionParameterBuffer
    getTransactionParameters(int isolation)
    Get the transaction parameter buffer corresponding to the current connection request information.
    String
    getType()
    String
    getUseTranslation()
    String
    getUserName()
    int
    getWorkingSize()
    boolean
    isDefaultResultSetHoldable()
    boolean
    isKeepStatements()
    boolean
    isPingable()
    Check if this pool supports pingable connections.
    boolean
    isPooling()
    Check if this connection pool uses connection pooling, or just implements JDBC 2.0 SE interfaces.
    boolean
    isStatementPooling()
    Check if this connection pool provides also prepared statement pooling.
    boolean
    isTimestampUsesLocalTimezone()
    boolean
    isUseStandardUdf()
    boolean
    isUseStreamBlobs()
    void
    restart()
    void
    setBlobBufferSize(int bufferSize)
    void
    setBlockingTimeout(int blockingTimeoutValue)
    void
    setBuffersNumber(int buffersNumber)
    void
    setCharSet(String charSet)
    void
    setDatabase(String database)
    void
    setDefaultIsolation(String isolation)
    Set the default transaction isolation level as string.
    void
    setDefaultResultSetHoldable(boolean isHoldable)
    void
    setDefaultTransactionIsolation(int defaultIsolationLevel)
    Set the default transaction isolation level.
    void
    setDescription(String descriptionValue)
    void
    setEncoding(String encoding)
    void
    setIdleTimeout(int idleTimeoutValue)
    Deprecated. non-standard name, use setMaxIdleTime(int).
    void
    setIsolation(String isolation)
    Deprecated. Use setDefaultIsolation(String) instead.
    void
    setKeepStatements(boolean keepStatements)
    void
    setLogWriter(PrintWriter printWriter)
    Set log writer.
    void
    setLoginTimeout(int seconds)
    Set login timeout.
    void
    setMaxConnections(int maxConnections)
    Deprecated. non-standard name, use setMaxPoolSize(int).
    void
    setMaxIdleTime(int maxIdleTime)
    void
    setMaxPoolSize(int maxPoolSize)
    void
    setMaxStatements(int maxStatements)
    void
    setMinConnections(int minConnections)
    Deprecated. non-standard name, use setMinPoolSize(int)
    void
    setMinPoolSize(int minPoolSize)
    void
    setNonStandardProperty(String propertyMapping)
    Set the property that does not have corresponding setter method.
    void
    setNonStandardProperty(String key, String value)
    Set the property that does not have corresponding setter method.
    void
    setPassword(String password)
    void
    setPingInterval(int pingIntervalValue)
    void
    setPingStatement(String pingStatement)
    void
    setPooling(boolean pooling)
    void
    setProperties(Properties props)
    void
    setReference(Reference reference)
    Set JNDI reference for this data source.
    void
    setRetryInterval(int retryInterval)
    void
    setRoleName(String roleName)
    void
    setSocketBufferSize(int socketBufferSize)
    void
    setSqlDialect(String sqlDialect)
    void
    setSqlRole(String sqlRole)
    Deprecated. please use setRoleName(String) instead.
    void
    setStatementPooling(boolean statementPooling)
    void
    setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
    void
    setTpbMapping(String tpbMapping)
    Set path to the properties file with the TPB mapping.
    void
    setTransactionIsolationLevel(int level)
    Deprecated. Use setDefaultTransactionIsolation(int) instead.
    void
    setTransactionParameters(int isolation, TransactionParameterBuffer tpb)
    Set transaction parameters for the specified transaction isolation level.
    void
    setType(String type)
    void
    setUseStandardUdf(boolean useStandardUdf)
    void
    setUseStreamBlobs(boolean useStreamBlobs)
    void
    setUseTranslation(String translationPath)
    void
    setUserName(String userName)
    void
    shutdown()

    Constructor Details

    FBWrappingDataSource

    public FBWrappingDataSource()
    Create instance of this class.

    Method Details

    finalize

    protected void finalize()
                throws Throwable
    Finalize this instance. This method will shut the pool down.

    getBlobBufferSize

    public int getBlobBufferSize()
    Specified by:
    getBlobBufferSize in interface FirebirdConnectionProperties
    Returns:
    BLOB buffer size in bytes.

    getBlockingTimeout

    public int getBlockingTimeout()
    Get time during which javax.sql.ConnectionPoolDataSource.getPooledConnection() can block. By default method blocks forever.
    Specified by:
    getBlockingTimeout in interface FirebirdPool
    getBlockingTimeout in interface ConnectionPoolConfiguration
    Returns:
    pool blocking timeout in milliseconds, Integer.MAX_VALUE indicates blocking forever.

    getBuffersNumber

    public int getBuffersNumber()
    Specified by:
    getBuffersNumber in interface FirebirdConnectionProperties
    Returns:
    number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.

    getCharSet

    public String getCharSet()
    Specified by:
    getCharSet in interface FirebirdConnectionProperties
    Returns:
    Character set for the connection.

    getConnection

    public Connection getConnection()
                throws SQLException
    Get JDBC connection from this data source.
    Returns:
    instance of Connection.

    getConnection

    public Connection getConnection(String user,
                                    String password)
                throws SQLException
    Get JDBC connection for the specified user name and password. of {@link Connection}

    getConnectionCount

    public int getConnectionCount()
                throws SQLException

    Deprecated. Confusing name. Use getFreeSize() instead.


    getDatabase

    public String getDatabase()
    Specified by:
    getDatabase in interface FirebirdConnectionProperties
    Returns:
    path to the database including the server name and the port, if needed.

    getDatabaseParameterBuffer

    public DatabaseParameterBuffer getDatabaseParameterBuffer()
                throws SQLException
    Get the database parameter buffer corresponding to the current connection request information.
    Specified by:
    getDatabaseParameterBuffer in interface FirebirdConnectionProperties
    Returns:
    instance of DatabaseParameterBuffer.

    getDefaultIsolation

    public String getDefaultIsolation()
    Specified by:
    getDefaultIsolation in interface FirebirdConnectionProperties
    Returns:
    default transaction isolation as string.

    getDefaultReference

    public Reference getDefaultReference()
    Get default JNDI reference for this datasource. This method is called if datasource is used in non-JCA environment.
    Returns:
    instance of Reference containing all information that allows to reconstruct the datasource.

    getDefaultTransactionIsolation

    public int getDefaultTransactionIsolation()
    Get the default transaction isolation level. This is the transaction isolation level for the newly created connections.
    Specified by:
    getDefaultTransactionIsolation in interface FirebirdConnectionProperties
    Returns:
    default transaction isolation level.

    getDescription

    public String getDescription()

    getEncoding

    public String getEncoding()
    Specified by:
    getEncoding in interface FirebirdConnectionProperties
    Returns:
    Character encoding for the connection.

    getFreeSize

    public int getFreeSize()
                throws SQLException
    Specified by:
    getFreeSize in interface FirebirdPool

    getIdleTimeout

    public int getIdleTimeout()

    Deprecated. non-standard name, use getMaxIdleTime().

    Specified by:
    getIdleTimeout in interface ConnectionPoolConfiguration

    getIsolation

    public String getIsolation()

    Deprecated. Use getDefaultIsolation() instead.


    getLogWriter

    public PrintWriter getLogWriter()
    Get log writer.
    Returns:
    instance of PrintWriter.

    getLoginTimeout

    public int getLoginTimeout()
    Get login timeout.
    Returns:
    login timeout.

    getMaxConnections

    public int getMaxConnections()

    Deprecated. non-standard name, use getMaxPoolSize().

    Specified by:
    getMaxConnections in interface ConnectionPoolConfiguration

    getMaxIdleTime

    public int getMaxIdleTime()
    Get time after which idle connections will be deallocated.
    Specified by:
    getMaxIdleTime in interface FirebirdPool
    getMaxIdleTime in interface ConnectionPoolConfiguration
    Returns:
    idle timeout in milliseconds, Integer.MAX_VALUE indicates that idle connections are not removed.

    getMaxPoolSize

    public int getMaxPoolSize()
    Get maximum number of physical connections that can be simultaneously open.
    Specified by:
    getMaxPoolSize in interface FirebirdPool
    getMaxPoolSize in interface ConnectionPoolConfiguration
    Returns:
    maximum number of simultaneously open physical database connections, 0 if no limit exists.

    getMaxStatements

    public int getMaxStatements()
    Specified by:
    getMaxStatements in interface FirebirdPool

    getMinConnections

    public int getMinConnections()

    Deprecated. non-standard name, use getMinPoolSize()

    Specified by:
    getMinConnections in interface ConnectionPoolConfiguration

    getMinPoolSize

    public int getMinPoolSize()
    Get minimum number of open JDBC connections that will be created when pool is started.
    Specified by:
    getMinPoolSize in interface FirebirdPool
    getMinPoolSize in interface ConnectionPoolConfiguration
    Returns:
    minimum number of open JDBC connections to open at startup.

    getNonStandardProperty

    public String getNonStandardProperty(String key)
    Get the property that does not have corresponding getter method by its name.
    Specified by:
    getNonStandardProperty in interface FirebirdConnectionProperties
    Parameters:
    key - name of the property to get.
    Returns:
    value of the property.

    getObjectInstance

    public Object getObjectInstance(Object obj,
                                    Name name,
                                    Context nameCtx,
                                    Hashtable environment)
                throws Exception
    Get object instance for the specified name in the specified context. This method constructs new datasource if obj represents Reference, whose factory class is equal to this class.

    getPassword

    public String getPassword()
    Specified by:
    getPassword in interface FirebirdConnectionProperties
    Returns:
    password corresponding to the specified user name.

    getPingInterval

    public int getPingInterval()
    Get time interval after which connection should be pinged.
    Specified by:
    getPingInterval in interface FirebirdPool
    getPingInterval in interface ConnectionPoolConfiguration
    Returns:
    number of milliseconds in the ping interval.

    getPingStatement

    public String getPingStatement()
    Get SQL statement that will be used to ping connection. Ping SQL statement returns exactly one row without throwing an exception. Ping SQL statement must not influence the outcome of a transaction.

    Examples of ping SQL statements:

    • Oracle: "SELECT CAST(1 AS INTEGER) FROM DUAL"
    • Firebird: "SELECT CAST(1 AS INTEGER) FROM RDB$DATABASE"
    Specified by:
    getPingStatement in interface ConnectionPoolConfiguration
    Returns:
    SQL statement that will be used to ping connection.

    getPooling

    public boolean getPooling()

    Deprecated. use isPooling() method.


    getReference

    public Reference getReference()
    Get JDNI reference.
    Returns:
    instance of Reference.

    getRetryInterval

    public int getRetryInterval()
    Get interval of getting connections retries. It might happen that pool contains no free connection. In order not to wait until connection is returned into the pool, pool will try to obtain connection again and again with the interval returned by this method. Default value is 1000 (1 sec).
    Specified by:
    getRetryInterval in interface ConnectionPoolConfiguration
    Returns:
    retry interval in milliseconds.

    getRoleName

    public String getRoleName()
    Specified by:
    getRoleName in interface FirebirdConnectionProperties
    Returns:
    SQL role to use.

    getSocketBufferSize

    public int getSocketBufferSize()
    Specified by:
    getSocketBufferSize in interface FirebirdConnectionProperties
    Returns:
    socket buffer size in bytes, or -1 is not specified.

    getSqlDialect

    public String getSqlDialect()
    Specified by:
    getSqlDialect in interface FirebirdConnectionProperties
    Returns:
    SQL dialect of the client.

    getSqlRole

    public String getSqlRole()

    Deprecated. please use getRoleName() instead.


    getTotalSize

    public int getTotalSize()
                throws SQLException
    Specified by:
    getTotalSize in interface FirebirdPool

    getTpbMapping

    public String getTpbMapping()
    Get the used TPB mapping.
    Specified by:
    getTpbMapping in interface FirebirdConnectionProperties
    Returns:
    path to the TPB mapping.

    getTransactionIsolationLevel

    public int getTransactionIsolationLevel()

    Deprecated. Use getDefaultTransactionIsolation() instead.


    getTransactionParameters

    public TransactionParameterBuffer getTransactionParameters(int isolation)
    Get the transaction parameter buffer corresponding to the current connection request information.
    Specified by:
    getTransactionParameters in interface FirebirdConnectionProperties
    Parameters:
    isolation - transaction isolation level for which TPB should be returned.
    Returns:
    instance of TransactionParameterBuffer.

    getType

    public String getType()
    Specified by:
    getType in interface FirebirdConnectionProperties
    Returns:
    type of the connection, for example, "PURE_JAVA", "LOCAL", "EMBEDDED", depends on the GDS implementations installed in the system.

    getUseTranslation

    public String getUseTranslation()
    Specified by:
    getUseTranslation in interface FirebirdConnectionProperties
    Returns:
    path to the character translation table.

    getUserName

    public String getUserName()
    Specified by:
    getUserName in interface FirebirdConnectionProperties
    Returns:
    name of the user that will be used when connecting to the database.

    getWorkingSize

    public int getWorkingSize()
                throws SQLException
    Specified by:
    getWorkingSize in interface FirebirdPool

    isDefaultResultSetHoldable

    public boolean isDefaultResultSetHoldable()
    Specified by:
    isDefaultResultSetHoldable in interface FirebirdConnectionProperties

    isKeepStatements

    public boolean isKeepStatements()

    isPingable

    public boolean isPingable()
    Check if this pool supports pingable connections. Pingable connections are used to correctly check if connection is still alive or not.
    Specified by:
    isPingable in interface ConnectionPoolConfiguration
    Returns:
    true if this pool supports pingable connections.

    isPooling

    public boolean isPooling()
    Check if this connection pool uses connection pooling, or just implements JDBC 2.0 SE interfaces. By default pooling is on. It might make sense to set pooling off to check performance degradation in test environment. It could be also used in the environment where physical connection must be closed right after usage, however using JDBC 2.0 SE interfaces is either a requirement or is simpler than standard java.sql.Driver.
    Specified by:
    isPooling in interface FirebirdPool
    isPooling in interface ConnectionPoolConfiguration
    Returns:
    true if pooling is enabled.

    isStatementPooling

    public boolean isStatementPooling()
    Check if this connection pool provides also prepared statement pooling. By default prepared statement pooling is enabled, however there might be situations where statement pooling is not desired, for example in environments where database can quickly run out of handles and fast handle reuse is required.
    Specified by:
    isStatementPooling in interface FirebirdPool
    isStatementPooling in interface ConnectionPoolConfiguration
    Returns:
    true if prepared statement pooling is enabled.

    isTimestampUsesLocalTimezone

    public boolean isTimestampUsesLocalTimezone()
    Specified by:
    isTimestampUsesLocalTimezone in interface FirebirdConnectionProperties
    Returns:
    true if the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.

    isUseStandardUdf

    public boolean isUseStandardUdf()
    Specified by:
    isUseStandardUdf in interface FirebirdConnectionProperties
    Returns:
    true if driver should assume that standard UDF are installed.

    isUseStreamBlobs

    public boolean isUseStreamBlobs()
    Specified by:
    isUseStreamBlobs in interface FirebirdConnectionProperties
    Returns:
    true if stream blobs should be created, otherwise false.

    restart

    public void restart()
    Specified by:
    restart in interface FirebirdPool

    setBlobBufferSize

    public void setBlobBufferSize(int bufferSize)
    Specified by:
    setBlobBufferSize in interface FirebirdConnectionProperties
    Parameters:
    bufferSize - size of the BLOB buffer in bytes.

    setBlockingTimeout

    public void setBlockingTimeout(int blockingTimeoutValue)
    Specified by:
    setBlockingTimeout in interface FirebirdPool

    setBuffersNumber

    public void setBuffersNumber(int buffersNumber)
    Specified by:
    setBuffersNumber in interface FirebirdConnectionProperties
    Parameters:
    buffersNumber - number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.

    setCharSet

    public void setCharSet(String charSet)
    Specified by:
    setCharSet in interface FirebirdConnectionProperties
    Parameters:
    charSet - Character set for the connection. Similar to encoding property, but accepts Java names instead of Firebird ones.

    setDatabase

    public void setDatabase(String database)
    Specified by:
    setDatabase in interface FirebirdConnectionProperties
    Parameters:
    database - path to the database including the server name and the port, if needed.

    setDefaultIsolation

    public void setDefaultIsolation(String isolation)
    Set the default transaction isolation level as string. This method is complementary to the FirebirdConnectionProperties.setDefaultTransactionIsolation(int), however it takes a string as parameter instead of a numeric constant.

    Following strings are allowed:

    • "TRANSACTION_READ_COMMITTED" for a READ COMMITTED isolation level.
    • "TRANSACTION_REPEATABLE_READ" for a REPEATABLE READ isolation level.
    • "TRANSACTION_SERIALIZABLE" for a SERIALIZABLE isolation level.
    Specified by:
    setDefaultIsolation in interface FirebirdConnectionProperties
    Parameters:
    isolation - string constant representing a default isolation level.

    setDefaultResultSetHoldable

    public void setDefaultResultSetHoldable(boolean isHoldable)
    Specified by:
    setDefaultResultSetHoldable in interface FirebirdConnectionProperties

    setDefaultTransactionIsolation

    public void setDefaultTransactionIsolation(int defaultIsolationLevel)
    Set the default transaction isolation level.
    Specified by:
    setDefaultTransactionIsolation in interface FirebirdConnectionProperties
    Parameters:
    defaultIsolationLevel - default transaction isolation level.

    setDescription

    public void setDescription(String descriptionValue)

    setEncoding

    public void setEncoding(String encoding)
    Specified by:
    setEncoding in interface FirebirdConnectionProperties
    Parameters:
    encoding - Character encoding for the connection. See Firebird documentation for more information.

    setIdleTimeout

    public void setIdleTimeout(int idleTimeoutValue)

    Deprecated. non-standard name, use setMaxIdleTime(int).


    setIsolation

    public void setIsolation(String isolation)
                throws SQLException

    Deprecated. Use setDefaultIsolation(String) instead.


    setKeepStatements

    public void setKeepStatements(boolean keepStatements)

    setLogWriter

    public void setLogWriter(PrintWriter printWriter)
    Set log writer.
    Parameters:
    printWriter - instance of PrintWriter.

    setLoginTimeout

    public void setLoginTimeout(int seconds)
    Set login timeout.
    Parameters:
    seconds - login timeout.

    setMaxConnections

    public void setMaxConnections(int maxConnections)

    Deprecated. non-standard name, use setMaxPoolSize(int).


    setMaxIdleTime

    public void setMaxIdleTime(int maxIdleTime)
    Specified by:
    setMaxIdleTime in interface FirebirdPool

    setMaxPoolSize

    public void setMaxPoolSize(int maxPoolSize)
    Specified by:
    setMaxPoolSize in interface FirebirdPool

    setMaxStatements

    public void setMaxStatements(int maxStatements)
    Specified by:
    setMaxStatements in interface FirebirdPool

    setMinConnections

    public void setMinConnections(int minConnections)

    Deprecated. non-standard name, use setMinPoolSize(int)


    setMinPoolSize

    public void setMinPoolSize(int minPoolSize)
    Specified by:
    setMinPoolSize in interface FirebirdPool

    setNonStandardProperty

    public void setNonStandardProperty(String propertyMapping)
    Set the property that does not have corresponding setter method.
    Specified by:
    setNonStandardProperty in interface FirebirdConnectionProperties
    Parameters:
    propertyMapping - parameter value in the ?propertyName[=propertyValue]? form, this allows setting non-standard parameters using configuration files.

    setNonStandardProperty

    public void setNonStandardProperty(String key,
                                       String value)
    Set the property that does not have corresponding setter method.
    Specified by:
    setNonStandardProperty in interface FirebirdConnectionProperties
    Parameters:
    key - name of the property to set.
    value - value of the property.

    setPassword

    public void setPassword(String password)
    Specified by:
    setPassword in interface FirebirdConnectionProperties
    Parameters:
    password - password corresponding to the specified user name.

    setPingInterval

    public void setPingInterval(int pingIntervalValue)
    Specified by:
    setPingInterval in interface FirebirdPool

    setPingStatement

    public void setPingStatement(String pingStatement)

    setPooling

    public void setPooling(boolean pooling)
    Specified by:
    setPooling in interface FirebirdPool

    setProperties

    public void setProperties(Properties props)

    setReference

    public void setReference(Reference reference)
    Set JNDI reference for this data source.
    Parameters:
    reference - JNDI reference.

    setRetryInterval

    public void setRetryInterval(int retryInterval)

    setRoleName

    public void setRoleName(String roleName)
    Specified by:
    setRoleName in interface FirebirdConnectionProperties
    Parameters:
    roleName - SQL role to use.

    setSocketBufferSize

    public void setSocketBufferSize(int socketBufferSize)
    Specified by:
    setSocketBufferSize in interface FirebirdConnectionProperties
    Parameters:
    socketBufferSize - socket buffer size in bytes.

    setSqlDialect

    public void setSqlDialect(String sqlDialect)
    Specified by:
    setSqlDialect in interface FirebirdConnectionProperties
    Parameters:
    sqlDialect - SQL dialect of the client.

    setSqlRole

    public void setSqlRole(String sqlRole)

    Deprecated. please use setRoleName(String) instead.


    setStatementPooling

    public void setStatementPooling(boolean statementPooling)
    Specified by:
    setStatementPooling in interface FirebirdPool

    setTimestampUsesLocalTimezone

    public void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
    Specified by:
    setTimestampUsesLocalTimezone in interface FirebirdConnectionProperties
    Parameters:
    timestampUsesLocalTimezone - true if the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.

    setTpbMapping

    public void setTpbMapping(String tpbMapping)
    Set path to the properties file with the TPB mapping. The path begins with the protocol specification followed by the path to the resource. A special protocol "res:" should be used to specify resource in the classpath.

    For the compatibility reasons, if no protocol is specified, classpath is used by default.

    Properties file contains a mapping between the transaction isolation level (name of the constant in the java.sql.Connection interface and a comma-separated list of TPB parameters.

    Specified by:
    setTpbMapping in interface FirebirdConnectionProperties
    Parameters:
    tpbMapping - path to the properties file.

    setTransactionIsolationLevel

    public void setTransactionIsolationLevel(int level)

    Deprecated. Use setDefaultTransactionIsolation(int) instead.


    setTransactionParameters

    public void setTransactionParameters(int isolation,
                                         TransactionParameterBuffer tpb)
    Set transaction parameters for the specified transaction isolation level. The specified TPB is used as a default mapping for the specified isolation level.
    Specified by:
    setTransactionParameters in interface FirebirdConnectionProperties
    Parameters:
    isolation - transaction isolation level.
    tpb - instance of TransactionParameterBuffer containing transaction parameters.

    setType

    public void setType(String type)
    Specified by:
    setType in interface FirebirdConnectionProperties
    Parameters:
    type - type of the connection, for example, "PURE_JAVA", "LOCAL", "EMBEDDED", depends on the GDS implementations installed in the system.

    setUseStandardUdf

    public void setUseStandardUdf(boolean useStandardUdf)
    Specified by:
    setUseStandardUdf in interface FirebirdConnectionProperties
    Parameters:
    useStandardUdf - true if driver should assume that standard UDF are installed.

    setUseStreamBlobs

    public void setUseStreamBlobs(boolean useStreamBlobs)
    Specified by:
    setUseStreamBlobs in interface FirebirdConnectionProperties
    Parameters:
    useStreamBlobs - true if stream blobs should be created, otherwise false.

    setUseTranslation

    public void setUseTranslation(String translationPath)
    Specified by:
    setUseTranslation in interface FirebirdConnectionProperties
    Parameters:
    translationPath - path to the character translation table.

    setUserName

    public void setUserName(String userName)
    Specified by:
    setUserName in interface FirebirdConnectionProperties
    Parameters:
    userName - name of the user that will be used when connecting to the database.

    shutdown

    public void shutdown()
    Specified by:
    shutdown in interface FirebirdPool

    Copyright B) 2001 David Jencks and other authors. All rights reserved.