## org.firebirdsql.pool
Class AbstractFBConnectionPoolDataSource

    java.lang.Object
      org.firebirdsql.pool.AbstractConnectionPool
          org.firebirdsql.pool.BasicAbstractConnectionPool
              org.firebirdsql.pool.AbstractFBConnectionPoolDataSource

All Implemented Interfaces:
  Serializable, EventListener, Referenceable, CommonDataSource, ConnectionEventListener, ConnectionPoolDataSource, XADataSource, FirebirdConnectionProperties, ConnectionPoolConfiguration, FirebirdPool, PooledConnectionEventListener, PooledConnectionManager, PooledObjectListener

Direct Known Subclasses:
  FBConnectionPoolDataSource

    public abstract class AbstractFBConnectionPoolDataSource

extends BasicAbstractConnectionPool
implements PooledConnectionManager, ConnectionPoolDataSource, XADataSource, PooledConnectionEventListener, FirebirdPool

Connection pool for Firebird JDBC driver. Following properties are supported:

- `blobBufferSize` size of the buffer used to transfer BLOB data.
- `blockingTimeout` time in milliseconds during which `getPooledConnection()` 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.
- `sqlRole` 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 `getPooledConnection()` method, but not yet closed).

Author:
  Roman Rokytskyy
See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.firebirdsql.pool.AbstractConnectionPool
`AbstractConnectionPool.UserPasswordPair`

Field Summary
`static AbstractConnectionPool.UserPasswordPair` `EMPTY_USER_PASSWORD`
`protected static String` `REF_NON_STANDARD_PROPERTY`
`protected static String` `REF_PROPERTIES`

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

Method Summary
`PooledObject` `allocateConnection(Object key)` Allocate new physical connection for the specified user name and password.
`void` `connectionClosed(ConnectionEvent connectionEvent)` Notify about connection being closed.
`void` `connectionErrorOccurred(ConnectionEvent event)` Notify about serious error when using the connection.
`protected BasicAbstractConnectionPool` `createObjectInstance()`
`int` `getBlobBufferSize()`
`int` `getBuffersNumber()`
`String` `getCharSet()`
`protected PooledConnectionManager` `getConnectionManager()` Get instance of `PooledConnectionManager` responsible for instantiating pooled connections.
`FBConnectionProperties` `getConnectionProperties()` Get connection properties.
`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` `getEncoding()`
`int` `getFreeSize()` Get number of free connections in this pool.
`GDSType` `getGDSType()` Get type of JDBC driver that is used.
`protected Logger` `getLogger()` Get logger for this instance.
`int` `getLoginTimeout()` Get login timeout.
`PrintWriter` `getLogWriter()`
`String` `getNonStandardProperty(String key)` Get the property that does not have corresponding getter method by its name.
`String` `getPassword()`
`String` `getPingStatement()` Get SQL statement that will be used to "ping" the connection.
`PooledConnection` `getPooledConnection()` Get pooled connection.
`protected PooledObject` `getPooledConnection(org.firebirdsql.pool.PooledConnectionQueue queue)` Get pooled connection from the pooled queue.
`PooledConnection` `getPooledConnection(String user, String password)` Get pooled connection for the specified user name and password.
`protected String` `getPoolName()` Get name of the connection queue.
`String` `getRoleName()`
`int` `getSocketBufferSize()`
`String` `getSqlDialect()`
`String` `getSqlRole()` Deprecated. please use `getRoleName()` instead.
`int` `getTotalSize()` Get total size of physical connections opened to the database.
`String` `getTpbMapping()` Get the used TPB mapping.
`TransactionParameterBuffer` `getTransactionParameters(int isolation)` Get the transaction parameter buffer corresponding to the current connection request information.
`String` `getType()` Get type of JDBC driver that will be used.
`String` `getUserName()`
`String` `getUseTranslation()`
`int` `getWorkingSize()` Get number of connections that are in use.
`XAConnection` `getXAConnection()` Get XA connection.
`XAConnection` `getXAConnection(String user, String password)` Get XA connection for the specified user name and password.
`boolean` `isDefaultResultSetHoldable()`
`boolean` `isPingable()` Check if this configuation defines a pingable connection JDBC pool.
`boolean` `isTimestampUsesLocalTimezone()`
`boolean` `isUseStandardUdf()`
`boolean` `isUseStreamBlobs()`
`void` `physicalConnectionClosed(ConnectionEvent connectionEvent)` Notify about physical connection being closed.
`void` `physicalConnectionDeallocated(ConnectionEvent connectionEvent)` Notify about the deallocation of the physical connection.
`protected Object` `processObjectInstance(AbstractFBConnectionPoolDataSource ds, Reference ref)`
`void` `setBlobBufferSize(int blobBufferSize)`
`void` `setBuffersNumber(int buffersNumber)`
`void` `setCharSet(String charSet)`
`void` `setConnectionProperties(FBConnectionProperties props)` Set the connection properties in bulk.
`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` `setEncoding(String encoding)`
`void` `setGDSType(GDSType gdsType)` Set type of the JDBC driver to use.
`void` `setLoginTimeout(int seconds)` Set login timeout for new connection.
`void` `setLogWriter(PrintWriter out)`
`void` `setNonStandardProperty(String propertyMapping)` Method that allows setting non-standard property in the form "key=value" form.
`void` `setNonStandardProperty(String key, String value)` Set the property that does not have corresponding setter method.
`void` `setPassword(String password)`
`void` `setProperties(Properties properties)` Set JDBC properties that will be passed when opening a connection.
`void` `setRoleName(String roleName)`
`void` `setSocketBufferSize(int socketBufferSize)`
`void` `setSqlDialect(String sqlDialect)`
`void` `setSqlRole(String sqlRole)` Deprecated. please use `setRoleName(String)` instead.
`void` `setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)`
`void` `setTpbMapping(String tpbMapping)` Set path to the properties file with the TPB mapping.
`void` `setTransactionParameters(int isolation, TransactionParameterBuffer tpb)` Set transaction parameters for the specified transaction isolation level.
`void` `setType(String type)` Set type of JDBC driver to use.
`void` `setUserName(String userName)`
`void` `setUseStandardUdf(boolean useStandardUdf)`
`void` `setUseStreamBlobs(boolean useStreamBlobs)`
`void` `setUseTranslation(String translationPath)`

Methods inherited from class org.firebirdsql.pool.BasicAbstractConnectionPool

`deserialize, getBlockingTimeout, getConfiguration, getIdleTimeout, getMaxConnections, getMaxIdleTime, getMaxPoolSize, getMaxStatements, getMinConnections, getMinPoolSize, getObjectInstance, getPingInterval, getRefAddr, getReference, getRetryInterval, isKeepStatements, isPooling, isStatementPooling, serialize, setBlockingTimeout, setIdleTimeout, setKeepStatements, setMaxConnections, setMaxIdleTime, setMaxPoolSize, setMaxStatements, setMinConnections, setMinPoolSize, setPingInterval, setPingStatement, setPooling, setReference, setRetryInterval, setStatementPooling`

Methods inherited from class org.firebirdsql.pool.AbstractConnectionPool
`finalize, getQueue, physicalConnectionDeallocated, pooledObjectReleased, restart, shutdown`

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

Methods inherited from interface org.firebirdsql.pool.FirebirdPool
`getBlockingTimeout, getMaxIdleTime, getMaxPoolSize, getMaxStatements, getMinPoolSize, getPingInterval, isPooling, isStatementPooling, restart, setBlockingTimeout, setMaxIdleTime, setMaxPoolSize, setMaxStatements, setMinPoolSize, setPingInterval, setPooling, setStatementPooling, shutdown`

Methods inherited from interface org.firebirdsql.pool.ConnectionPoolConfiguration
`getIdleTimeout, getMaxConnections, getMinConnections, getRetryInterval`

Field Detail

### EMPTY_USER_PASSWORD

    public static final AbstractConnectionPool.UserPasswordPair EMPTY_USER_PASSWORD

### REF_PROPERTIES

    protected static final String REF_PROPERTIES

See Also:
  Constant Field Values

### REF_NON_STANDARD_PROPERTY

    protected static final String REF_NON_STANDARD_PROPERTY

See Also:
  Constant Field Values

Constructor Detail

### AbstractFBConnectionPoolDataSource

    public AbstractFBConnectionPoolDataSource()

  Create instance of this class.

Method Detail

### getConnectionProperties

    public FBConnectionProperties getConnectionProperties()

  Get connection properties. This method returns a live object where connection properties can be set. Usually application does not need to call this method, since this class implements appropriate interface and all properties can set directly. However, this is needed for custom serialization.

  Returns:
    "live" instance of `FBConnectionProperties`.

### setConnectionProperties

    public void setConnectionProperties(FBConnectionProperties props)

  Set the connection properties in bulk. This method replaces the instance created in constructor, therefore, if the managed connection factory was already initialized with that instance, change will not be visible to it. In this case appropriate exception is thrown.

  Parameters:
    `props` - instance of `FBConnectionProperties`.
  Throws:
    `IllegalPoolStateException` - if managed connection factory is already initialized.

### getLogger

    protected Logger getLogger()

  Description copied from class: `AbstractConnectionPool`
  Get logger for this instance. By default all log messages belong to this class. Subclasses can override this behavior.

  Specified by:
    `getLogger` in class `AbstractConnectionPool`
  Returns:
    instance of `Logger`.

### getConnectionManager

    protected PooledConnectionManager getConnectionManager()

  Description copied from class: `AbstractConnectionPool`
  Get instance of `PooledConnectionManager` responsible for instantiating pooled connections.

  Specified by:
    `getConnectionManager` in class `AbstractConnectionPool`
  Returns:
    instance of `PooledConnectionManager`

### allocateConnection

    public PooledObject allocateConnection(Object key)
                                    throws SQLException

  Allocate new physical connection for the specified user name and password.

  Specified by:
    `allocateConnection` in interface `PooledConnectionManager`
  Parameters:
    `key` - key identifying pooled object.
  Returns:
    instance of `PooledObject`.
  Throws:
    `SQLException` - if connection cannot be allocated.

### getPoolName

    protected String getPoolName()

  Get name of the connection queue.

  Specified by:
    `getPoolName` in class `AbstractConnectionPool`
  Returns:
    name of the connection queue.
  See Also:
    `AbstractConnectionPool.getPoolName()`

### getLogWriter

    public PrintWriter getLogWriter()

  Specified by:
    `getLogWriter` in interface `CommonDataSource`
  Specified by:
    `getLogWriter` in class `BasicAbstractConnectionPool`

### setLogWriter

    public void setLogWriter(PrintWriter out)

  Specified by:
    `setLogWriter` in interface `CommonDataSource`
  Specified by:
    `setLogWriter` in class `BasicAbstractConnectionPool`

### getLoginTimeout

    public int getLoginTimeout()

  Get login timeout.

  Specified by:
    `getLoginTimeout` in interface `CommonDataSource`
  Specified by:
    `getLoginTimeout` in class `BasicAbstractConnectionPool`
  Returns:
    value set in `setLoginTimeout(int)` method or 0.

### setLoginTimeout

    public void setLoginTimeout(int seconds)

  Set login timeout for new connection. Currently ignored.

  Specified by:
    `setLoginTimeout` in interface `CommonDataSource`
  Specified by:
    `setLoginTimeout` in class `BasicAbstractConnectionPool`
  Parameters:
    `seconds` - how long pool should wait until new connection is granted.

### getPooledConnection

    protected PooledObject getPooledConnection(org.firebirdsql.pool.PooledConnectionQueue queue)
                                        throws SQLException

  Get pooled connection from the pooled queue.

  Overrides:
    `getPooledConnection` in class `AbstractConnectionPool`
  Parameters:
    `queue` - instance of `PooledConnectionQueue` where connection will be obtained.
  Returns:
    instance of `PooledObject`.
  Throws:
    `SQLException` - if pooled connection cannot be obtained.

### getPooledConnection

    public PooledConnection getPooledConnection()
                                         throws SQLException

  Get pooled connection. This method will block until there will be free connection to return.

  Specified by:
    `getPooledConnection` in interface `ConnectionPoolDataSource`
  Specified by:
    `getPooledConnection` in class `BasicAbstractConnectionPool`
  Returns:
    instance of `PooledConnection`.
  Throws:
    `SQLException` - if pooled connection cannot be obtained.

### getPooledConnection

    public PooledConnection getPooledConnection(String user,
                                                String password)
                                         throws SQLException

  Get pooled connection for the specified user name and password.

  Specified by:
    `getPooledConnection` in interface `ConnectionPoolDataSource`
  Specified by:
    `getPooledConnection` in class `BasicAbstractConnectionPool`
  Parameters:
    `user` - user name.
    `password` - password corresponding to specified user name.
  Returns:
    instance of `PooledConnection` for the specified credentials.
  Throws:
    `SQLException` - always, this method is not yet implemented.

### getXAConnection

    public XAConnection getXAConnection()
                                 throws SQLException

  Get XA connection. This method will block until there will be free connection to return.

  Specified by:
    `getXAConnection` in interface `XADataSource`
  Returns:
    instance of `XAConnection`.
  Throws:
    `SQLException` - if pooled connection cannot be obtained.

### getXAConnection

    public XAConnection getXAConnection(String user,
                                        String password)
                                 throws SQLException

  Get XA connection for the specified user name and password.

  Specified by:
    `getXAConnection` in interface `XADataSource`
  Parameters:
    `user` - user name.
    `password` - password corresponding to specified user name.
  Returns:
    instance of `XAConnection` for the specified credentials.
  Throws:
    `SQLException` - always, this method is not yet implemented.

### connectionClosed

    public void connectionClosed(ConnectionEvent connectionEvent)

  Notify about connection being closed.

  Specified by:
    `connectionClosed` in interface `ConnectionEventListener`
  Parameters:
    `connectionEvent` - instance of `ConnectionEvent`.

### physicalConnectionClosed

    public void physicalConnectionClosed(ConnectionEvent connectionEvent)

  Notify about physical connection being closed.

  Specified by:
    `physicalConnectionClosed` in interface `PooledConnectionEventListener`
  Parameters:
    `connectionEvent` - instance of `ConnectionEvent`.

### physicalConnectionDeallocated

    public void physicalConnectionDeallocated(ConnectionEvent connectionEvent)

  Notify about the deallocation of the physical connection.

  Specified by:
    `physicalConnectionDeallocated` in interface `PooledConnectionEventListener`
  Parameters:
    `connectionEvent` - instance of `ConnectionEvent`.

### connectionErrorOccurred

    public void connectionErrorOccurred(ConnectionEvent event)

  Notify about serious error when using the connection. Currently these events are ignored.

  Specified by:
    `connectionErrorOccurred` in interface `ConnectionEventListener`
  Parameters:
    `event` - instance of `ConnectionEvent` containing information about an error.

### getFreeSize

    public int getFreeSize()
                    throws SQLException

  Description copied from class: `AbstractConnectionPool`
  Get number of free connections in this pool. This method returns the number of free open connections to the specified database. It might return 0, but this does not mean that next request will block. This will happen only if `getMaxSize() != 0 && getMaxSize() == getWorkingSize()`, meaning that we have allocated maximum number of connections and all of them are in use.

  Specified by:
    `getFreeSize` in interface `FirebirdPool`
  Specified by:
    `getFreeSize` in class `AbstractConnectionPool`
  Returns:
    number of free connections left.
  Throws:
    `SQLException`

### getTotalSize

    public int getTotalSize()
                     throws SQLException

  Description copied from class: `AbstractConnectionPool`
  Get total size of physical connections opened to the database.

  Specified by:
    `getTotalSize` in interface `FirebirdPool`
  Specified by:
    `getTotalSize` in class `AbstractConnectionPool`
  Returns:
    total number of opened connections to the database.
  Throws:
    `SQLException`

### getWorkingSize

    public int getWorkingSize()
                       throws SQLException

  Description copied from class: `AbstractConnectionPool`
  Get number of connections that are in use.

  Specified by:
    `getWorkingSize` in interface `FirebirdPool`
  Specified by:
    `getWorkingSize` in class `AbstractConnectionPool`
  Returns:
    number of working connections.
  Throws:
    `SQLException`

### isPingable

    public boolean isPingable()

  Check if this configuation defines a pingable connection JDBC pool.

  Specified by:
    `isPingable` in interface `ConnectionPoolConfiguration`
  Overrides:
    `isPingable` in class `BasicAbstractConnectionPool`
  Returns:
    `true` if this pool supports pingable connections.
  See Also:
    `ConnectionPoolConfiguration.isPingable()`

### getPingStatement

    public String getPingStatement()

  Get SQL statement that will be used to "ping" the connection.

  Specified by:
    `getPingStatement` in interface `ConnectionPoolConfiguration`
  Overrides:
    `getPingStatement` in class `BasicAbstractConnectionPool`
  Returns:
    SQL statement that will be used to ping connection.
  See Also:
    `ConnectionPoolConfiguration.getPingStatement()`

### setProperties

    public void setProperties(Properties properties)

  Set JDBC properties that will be passed when opening a connection.

  Parameters:
    `properties` - instance of `Properties` containing properties of a connection to open.

### getType

    public String getType()

  Get type of JDBC driver that will be used. Note, value returned by this method might be different from that used in `setType(String)` if you used synonym (either `"TYPE4"` or `"TYPE2"`).

  Specified by:
    `getType` in interface `FirebirdConnectionProperties`
  Returns:
    one of the following values:
    - `"PURE_JAVA"` for pure Java type 4 JDBC driver.
    - `"NATIVE"` for type 2 JDBC driver that will use Firebird client library.
    - `"EMBEDDED"` for type 2 JDBC driver that will use embedded engine.

### setType

    public void setType(String type)

  Set type of JDBC driver to use.

  Specified by:
    `setType` in interface `FirebirdConnectionProperties`
  Parameters:
    `type` - type of driver to use. Possible values are (case insensitive):
    - `"PURE_JAVA"` or `"TYPE4"` for pure Java type 4 JDBC driver;
    - `"NATIVE"` or `"TYPE2"` for type 2 JDBC driver that will use Firebird client library.
    - `"EMBEDDED"` for type 2 JDBC driver that will use embedded version of the server.
  Throws:
    `SQLException` - if specified type is not known.

### getGDSType

    public GDSType getGDSType()

  Get type of JDBC driver that is used.

  Returns:
    type of JDBC driver that is used.

### setGDSType

    public void setGDSType(GDSType gdsType)

  Set type of the JDBC driver to use.

  Parameters:
    `gdsType` - type of the JDBC driver.

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

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

  Method that allows setting non-standard property in the form "key=value" form. This method is needed by some containers to specify properties in the configuration.

  Specified by:
    `setNonStandardProperty` in interface `FirebirdConnectionProperties`
  Parameters:
    `propertyMapping` - mapping between property name (key) and its value. Name and value are separated with "=", ":" or whitespace character. Whitespace characters on the beginning of the string and between key and value are ignored. No escaping is possible: "\n" is backslash-en, not a new line mark.

### getBlobBufferSize

    public int getBlobBufferSize()

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

### setBlobBufferSize

    public void setBlobBufferSize(int blobBufferSize)

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

### getEncoding

    public String getEncoding()

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

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

### getCharSet

    public String getCharSet()

  Specified by:
    `getCharSet` in interface `FirebirdConnectionProperties`
  Returns:
    Character set for the connection.
  See Also:
    `FirebirdConnectionProperties.setCharSet(String)`

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

### getPassword

    public String getPassword()

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

### setPassword

    public void setPassword(String password)

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

### getSocketBufferSize

    public int getSocketBufferSize()

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

### setSocketBufferSize

    public void setSocketBufferSize(int socketBufferSize)

  Specified by:
    `setSocketBufferSize` in interface `FirebirdConnectionProperties`
  Parameters:
    `socketBufferSize` - socket buffer size in bytes.

### getRoleName

    public String getRoleName()

  Specified by:
    `getRoleName` in interface `FirebirdConnectionProperties`
  Returns:
    SQL role to use.

### setRoleName

    public void setRoleName(String roleName)

  Specified by:
    `setRoleName` in interface `FirebirdConnectionProperties`
  Parameters:
    `roleName` - SQL role to use.

### getSqlRole

    public String getSqlRole()

  Deprecated. please use `getRoleName()` instead.

### setSqlRole

    public void setSqlRole(String sqlRole)

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

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

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

### getUserName

    public String getUserName()

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

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

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

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

### getSqlDialect

    public String getSqlDialect()

  Specified by:
    `getSqlDialect` in interface `FirebirdConnectionProperties`
  Returns:
    SQL dialect of the client.

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

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

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

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

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

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

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

### getDefaultReference

    public Reference getDefaultReference()

  Description copied from class: `BasicAbstractConnectionPool`
  Get default JNDI reference for this datasource. This method is called if datasource is used in non-JCA environment.

  Overrides:
    `getDefaultReference` in class `BasicAbstractConnectionPool`
  Returns:
    instance of `Reference` containing all information that allows to reconstruct the datasource.

### processObjectInstance

    protected Object processObjectInstance(AbstractFBConnectionPoolDataSource ds,
                                           Reference ref)
                                    throws Exception

  Throws:
    `Exception`

### createObjectInstance

    protected BasicAbstractConnectionPool createObjectInstance()

  Specified by:
    `createObjectInstance` in class `BasicAbstractConnectionPool`

Copyright © 2001-2010. All Rights Reserved.