## org.firebirdsql.pool
Class FBWrappingDataSource

    java.lang.Object
      org.firebirdsql.pool.FBWrappingDataSource

All Implemented Interfaces:
  Serializable, Wrapper, Referenceable, ObjectFactory, CommonDataSource, DataSource, FirebirdConnectionProperties, ConnectionPoolConfiguration, FirebirdPool

Direct Known Subclasses:
  FBWrappingDataSource

    public class FBWrappingDataSource

extends Object
implements DataSource, ObjectFactory, javax.resource.Referenceable, Serializable, FirebirdPool

Implementation of `DataSource` including connection pooling. Following properties are supported:

- `blobBufferSize` size of the buffer used to transfer BLOB data.
- `blockingTimeout` time in milliseconds during which `getConnection()` method will block if no free connection is in pool.
- `charSet` similar to `encoding`, but takes Java character set name instead of Firebird's encoding.
- `database` path to a database including the server name; for example `localhost/3050:c:/path/to/database.gdb`.
- `encoding` character encoding for the JDBC connection.
- `freeSize` read-only: gives amount of free connections in the pool, when 0, blocking will occur if `workingSize` is equal to `maxPoolSize`.
- `isolation` default transaction isolation level for connections as string; possible values are:
  - TRANSACTION_READ_COMMITTED
  - TRANSACTION_REPEATABLE_READ
  - TRANSACTION_SERIALIZABLE
- `loginTimeout` property from `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 `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):
  - `"PURE_JAVA"` or `"TYPE4"` for pure Java (type 4) JDBC connections;
  - `"NATIVE"` or `"TYPE2"` to use Firebird client library;
  - `"LOCAL"` to use Firebird client library in local-mode (IPC link to server);
  - `"EMBEDDED"` to use embedded engine.
- `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
See Also:
  Serialized Form

Constructor Summary
`FBWrappingDataSource()` Create instance of this class.

Method Summary
`protected void` `finalize()` Finalize this instance.
`int` `getBlobBufferSize()`
`int` `getBlockingTimeout()` Get time during which `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. Use `getFreeSize()` instead.
`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.
`int` `getLoginTimeout()` Get login timeout.
`PrintWriter` `getLogWriter()` Get log writer.
`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` `getUserName()`
`String` `getUseTranslation()`
`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()`
`boolean` `isWrapperFor(Class arg0)`
`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` `setLoginTimeout(int seconds)` Set login timeout.
`void` `setLogWriter(PrintWriter printWriter)` Set log writer.
`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` `setUserName(String userName)`
`void` `setUseStandardUdf(boolean useStandardUdf)`
`void` `setUseStreamBlobs(boolean useStreamBlobs)`
`void` `setUseTranslation(String translationPath)`
`void` `shutdown()`
`Object` `unwrap(Class arg0)`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FBWrappingDataSource

    public FBWrappingDataSource()

  Create instance of this class.

Method Detail

### finalize

    protected void finalize()
                     throws Throwable

  Finalize this instance. This method will shut the pool down.

  Overrides:
    `finalize` in class `Object`
  Throws:
    `Throwable` - if something went wrong.

### restart

    public void restart()

  Specified by:
    `restart` in interface `FirebirdPool`

### shutdown

    public void shutdown()

  Specified by:
    `shutdown` in interface `FirebirdPool`

### getConnection

    public Connection getConnection()
                             throws SQLException

  Get JDBC connection from this data source.

  Specified by:
    `getConnection` in interface `DataSource`
  Returns:
    instance of `Connection`.
  Throws:
    `SQLException` - if connection cannot be obtained due to some reason.

### getConnection

    public Connection getConnection(String user,
                                    String password)
                             throws SQLException

  Get JDBC connection for the specified user name and password.

  Specified by:
    `getConnection` in interface `DataSource`
  Throws:
    `SQLException` - if something went wrong.

### getLoginTimeout

    public int getLoginTimeout()

  Get login timeout.

  Specified by:
    `getLoginTimeout` in interface `CommonDataSource`
  Returns:
    login timeout.

### getLogWriter

    public PrintWriter getLogWriter()

  Get log writer.

  Specified by:
    `getLogWriter` in interface `CommonDataSource`
  Returns:
    instance of `PrintWriter`.

### setLoginTimeout

    public void setLoginTimeout(int seconds)

  Set login timeout.

  Specified by:
    `setLoginTimeout` in interface `CommonDataSource`
  Parameters:
    `seconds` - login timeout.

### setLogWriter

    public void setLogWriter(PrintWriter printWriter)

  Set log writer.

  Specified by:
    `setLogWriter` in interface `CommonDataSource`
  Parameters:
    `printWriter` - instance of `PrintWriter`.

### getBlockingTimeout

    public int getBlockingTimeout()

  Description copied from interface: `ConnectionPoolConfiguration`
  Get time during which `ConnectionPoolDataSource.getPooledConnection()` can block. By default method blocks forever.

  Specified by:
    `getBlockingTimeout` in interface `ConnectionPoolConfiguration`
  Specified by:
    `getBlockingTimeout` in interface `FirebirdPool`
  Returns:
    pool blocking timeout in milliseconds, `Integer.MAX_VALUE` indicates blocking forever.

### setBlockingTimeout

    public void setBlockingTimeout(int blockingTimeoutValue)

  Specified by:
    `setBlockingTimeout` in interface `FirebirdPool`

### getDescription

    public String getDescription()

### setDescription

    public void setDescription(String descriptionValue)

### getMaxIdleTime

    public int getMaxIdleTime()

  Description copied from interface: `ConnectionPoolConfiguration`
  Get time after which idle connections will be deallocated.

  Specified by:
    `getMaxIdleTime` in interface `ConnectionPoolConfiguration`
  Specified by:
    `getMaxIdleTime` in interface `FirebirdPool`
  Returns:
    idle timeout in milliseconds, `Integer.MAX_VALUE` indicates that idle connections are not removed.

### setMaxIdleTime

    public void setMaxIdleTime(int maxIdleTime)

  Specified by:
    `setMaxIdleTime` in interface `FirebirdPool`

### getIdleTimeout

    public int getIdleTimeout()

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

  Description copied from interface: `ConnectionPoolConfiguration`
  Get time after which idle connections will be deallocated.

  Specified by:
    `getIdleTimeout` in interface `ConnectionPoolConfiguration`
  Returns:
    idle timeout in milliseconds, `Integer.MAX_VALUE` indicates that idle connections are not removed.

### setIdleTimeout

    public void setIdleTimeout(int idleTimeoutValue)

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

### getMaxStatements

    public int getMaxStatements()

  Specified by:
    `getMaxStatements` in interface `FirebirdPool`

### setMaxStatements

    public void setMaxStatements(int maxStatements)

  Specified by:
    `setMaxStatements` in interface `FirebirdPool`

### getMaxPoolSize

    public int getMaxPoolSize()

  Description copied from interface: `ConnectionPoolConfiguration`
  Get maximum number of physical connections that can be simultaneously open.

  Specified by:
    `getMaxPoolSize` in interface `ConnectionPoolConfiguration`
  Specified by:
    `getMaxPoolSize` in interface `FirebirdPool`
  Returns:
    maximum number of simultaneously open physical database connections, 0 if no limit exists.

### setMaxPoolSize

    public void setMaxPoolSize(int maxPoolSize)

  Specified by:
    `setMaxPoolSize` in interface `FirebirdPool`

### getMaxConnections

    public int getMaxConnections()

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

  Description copied from interface: `ConnectionPoolConfiguration`
  Get maximum number of physical connections that can be simultaneously open.

  Specified by:
    `getMaxConnections` in interface `ConnectionPoolConfiguration`
  Returns:
    maximum number of simultaneously open physical database connections, 0 if no limit exists.

### setMaxConnections

    public void setMaxConnections(int maxConnections)

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

### getMinPoolSize

    public int getMinPoolSize()

  Description copied from interface: `ConnectionPoolConfiguration`
  Get minimum number of open JDBC connections that will be created when pool is started.

  Specified by:
    `getMinPoolSize` in interface `ConnectionPoolConfiguration`
  Specified by:
    `getMinPoolSize` in interface `FirebirdPool`
  Returns:
    minimum number of open JDBC connections to open at startup.

### setMinPoolSize

    public void setMinPoolSize(int minPoolSize)

  Specified by:
    `setMinPoolSize` in interface `FirebirdPool`

### getMinConnections

    public int getMinConnections()

  Deprecated. non-standard name, use `getMinPoolSize()`

  Description copied from interface: `ConnectionPoolConfiguration`
  Get minimum number of open JDBC connections that will be created when pool is started.

  Specified by:
    `getMinConnections` in interface `ConnectionPoolConfiguration`
  Returns:
    minimum number of open JDBC connections to open at startup.

### setMinConnections

    public void setMinConnections(int minConnections)

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

### isKeepStatements

    public boolean isKeepStatements()

### setKeepStatements

    public void setKeepStatements(boolean keepStatements)

### getPingInterval

    public int getPingInterval()

  Description copied from interface: `ConnectionPoolConfiguration`
  Get time interval after which connection should be pinged.

  Specified by:
    `getPingInterval` in interface `ConnectionPoolConfiguration`
  Specified by:
    `getPingInterval` in interface `FirebirdPool`
  Returns:
    number of milliseconds in the ping interval.

### setPingInterval

    public void setPingInterval(int pingIntervalValue)

  Specified by:
    `setPingInterval` in interface `FirebirdPool`

### getPingStatement

    public String getPingStatement()

  Description copied from interface: `ConnectionPoolConfiguration`
  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.

### setPingStatement

    public void setPingStatement(String pingStatement)

### getRetryInterval

    public int getRetryInterval()

  Description copied from interface: `ConnectionPoolConfiguration`
  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.

### setRetryInterval

    public void setRetryInterval(int retryInterval)

### isPingable

    public boolean isPingable()

  Description copied from interface: `ConnectionPoolConfiguration`
  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.

### getSqlRole

    public String getSqlRole()

  Deprecated. please use `getRoleName()` instead.

### setSqlRole

    public void setSqlRole(String sqlRole)

  Deprecated. please use `setRoleName(String)` instead.

### getPooling

    public boolean getPooling()

  Deprecated. use `isPooling()` method.

### isPooling

    public boolean isPooling()

  Description copied from interface: `ConnectionPoolConfiguration`
  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 `ConnectionPoolConfiguration`
  Specified by:
    `isPooling` in interface `FirebirdPool`
  Returns:
    `true` if pooling is enabled.

### setPooling

    public void setPooling(boolean pooling)

  Specified by:
    `setPooling` in interface `FirebirdPool`

### isStatementPooling

    public boolean isStatementPooling()

  Description copied from interface: `ConnectionPoolConfiguration`
  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 `ConnectionPoolConfiguration`
  Specified by:
    `isStatementPooling` in interface `FirebirdPool`
  Returns:
    `true` if prepared statement pooling is enabled.

### setStatementPooling

    public void setStatementPooling(boolean statementPooling)

  Specified by:
    `setStatementPooling` in interface `FirebirdPool`

### getConnectionCount

    public int getConnectionCount()
                           throws SQLException

  Deprecated. Confusing name. Use `getFreeSize()` instead.

  Throws:
    `SQLException`

### getFreeSize

    public int getFreeSize()
                    throws SQLException

  Specified by:
    `getFreeSize` in interface `FirebirdPool`
  Throws:
    `SQLException`

### getWorkingSize

    public int getWorkingSize()
                       throws SQLException

  Specified by:
    `getWorkingSize` in interface `FirebirdPool`
  Throws:
    `SQLException`

### getTotalSize

    public int getTotalSize()
                     throws SQLException

  Specified by:
    `getTotalSize` in interface `FirebirdPool`
  Throws:
    `SQLException`

### getTransactionIsolationLevel

    public int getTransactionIsolationLevel()

  Deprecated. Use `getDefaultTransactionIsolation()` instead.

### setTransactionIsolationLevel

    public void setTransactionIsolationLevel(int level)

  Deprecated. Use `setDefaultTransactionIsolation(int)` instead.

### getIsolation

    public String getIsolation()

  Deprecated. Use `getDefaultIsolation()` instead.

### setIsolation

    public void setIsolation(String isolation)
                      throws SQLException

  Deprecated. Use `setDefaultIsolation(String)` instead.

  Throws:
    `SQLException`

### setProperties

    public void setProperties(Properties props)

### getBlobBufferSize

    public int getBlobBufferSize()

  Specified by:
    `getBlobBufferSize` in interface `FirebirdConnectionProperties`
  Returns:
    BLOB buffer size in bytes.

### 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.
  See Also:
    `FirebirdConnectionProperties.setCharSet(String)`

### 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

  Description copied from interface: `FirebirdConnectionProperties`
  Get the database parameter buffer corresponding to the current connection request information.

  Specified by:
    `getDatabaseParameterBuffer` in interface `FirebirdConnectionProperties`
  Returns:
    instance of `DatabaseParameterBuffer`.
  Throws:
    `SQLException` - if database parameter buffer cannot be created.

### getDefaultIsolation

    public String getDefaultIsolation()

  Description copied from interface: `FirebirdConnectionProperties`
  Get the default transaction isolation level as string. This method is complementary to the `FirebirdConnectionProperties.getDefaultTransactionIsolation()`, however it takes a string as parameter instead of a numeric constant.

  Specified by:
    `getDefaultIsolation` in interface `FirebirdConnectionProperties`
  Returns:
    default transaction isolation as string.
  See Also:
    `FirebirdConnectionProperties.setDefaultIsolation(String)`

### getDefaultTransactionIsolation

    public int getDefaultTransactionIsolation()

  Description copied from interface: `FirebirdConnectionProperties`
  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.

### getEncoding

    public String getEncoding()

  Specified by:
    `getEncoding` in interface `FirebirdConnectionProperties`
  Returns:
    Character encoding for the connection.
  See Also:
    `FirebirdConnectionProperties.setEncoding(String)`

### getNonStandardProperty

    public String getNonStandardProperty(String key)

  Description copied from interface: `FirebirdConnectionProperties`
  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.

### getPassword

    public String getPassword()

  Specified by:
    `getPassword` in interface `FirebirdConnectionProperties`
  Returns:
    password corresponding to the specified user name.

### 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.

### getTpbMapping

    public String getTpbMapping()

  Description copied from interface: `FirebirdConnectionProperties`
  Get the used TPB mapping.

  Specified by:
    `getTpbMapping` in interface `FirebirdConnectionProperties`
  Returns:
    path to the TPB mapping.
  See Also:
    `FirebirdConnectionProperties.setTpbMapping(String)`

### getTransactionParameters

    public TransactionParameterBuffer getTransactionParameters(int isolation)

  Description copied from interface: `FirebirdConnectionProperties`
  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.

### getUserName

    public String getUserName()

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

### getUseTranslation

    public String getUseTranslation()

  Specified by:
    `getUseTranslation` in interface `FirebirdConnectionProperties`
  Returns:
    path to the character translation table.

### 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`.

### setBlobBufferSize

    public void setBlobBufferSize(int bufferSize)

  Specified by:
    `setBlobBufferSize` in interface `FirebirdConnectionProperties`
  Parameters:
    `bufferSize` - size of the BLOB buffer in bytes.

### 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)

  Description copied from interface: `FirebirdConnectionProperties`
  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.

### setDefaultTransactionIsolation

    public void setDefaultTransactionIsolation(int defaultIsolationLevel)

  Description copied from interface: `FirebirdConnectionProperties`
  Set the default transaction isolation level.

  Specified by:
    `setDefaultTransactionIsolation` in interface `FirebirdConnectionProperties`
  Parameters:
    `defaultIsolationLevel` - default transaction isolation level.

### 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.

### setNonStandardProperty

    public void setNonStandardProperty(String key,
                                       String value)

  Description copied from interface: `FirebirdConnectionProperties`
  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.

### setNonStandardProperty

    public void setNonStandardProperty(String propertyMapping)

  Description copied from interface: `FirebirdConnectionProperties`
  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.

### setPassword

    public void setPassword(String password)

  Specified by:
    `setPassword` in interface `FirebirdConnectionProperties`
  Parameters:
    `password` - password corresponding to the specified user name.

### 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.

### 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)

  Description copied from interface: `FirebirdConnectionProperties`
  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 `Connection` interface and a comma-separated list of TPB parameters.

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

### setTransactionParameters

    public void setTransactionParameters(int isolation,
                                         TransactionParameterBuffer tpb)

  Description copied from interface: `FirebirdConnectionProperties`
  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.

### 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.

### 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.

### isDefaultResultSetHoldable

    public boolean isDefaultResultSetHoldable()

  Specified by:
    `isDefaultResultSetHoldable` in interface `FirebirdConnectionProperties`

### setDefaultResultSetHoldable

    public void setDefaultResultSetHoldable(boolean isHoldable)

  Specified by:
    `setDefaultResultSetHoldable` in interface `FirebirdConnectionProperties`

### 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.

  Specified by:
    `getObjectInstance` in interface `ObjectFactory`
  Throws:
    `Exception`

### getReference

    public Reference getReference()

  Get JDNI reference.

  Specified by:
    `getReference` in interface `Referenceable`
  Returns:
    instance of `Reference`.

### setReference

    public void setReference(Reference reference)

  Set JNDI reference for this data source.

  Parameters:
    `reference` - JNDI reference.

### 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.

### isWrapperFor

    public boolean isWrapperFor(Class arg0)
                         throws SQLException

  Specified by:
    `isWrapperFor` in interface `Wrapper`
  Throws:
    `SQLException`

### unwrap

    public Object unwrap(Class arg0)
                  throws SQLException

  Specified by:
    `unwrap` in interface `Wrapper`
  Throws:
    `SQLException`

Copyright © 2001-2010. All Rights Reserved.