Module org.firebirdsql.jaybird
Package org.firebirdsql.jdbc

# Class FBConnection

java.lang.Object
org.firebirdsql.jdbc.FBConnection

All Implemented Interfaces:
  `AutoCloseable`, `Connection`, `Wrapper`, `FirebirdConnection`

@InternalApi public class FBConnection extends Object implements FirebirdConnection
The class `FBConnection` is a handle to a `FBManagedConnection` and implements `Connection`.

This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type. For the public API, refer to the `Connection` and `FirebirdConnection` interfaces.

Author:
  David Jencks, Mark Rotteveel

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final Set<Statement>`
  `activeStatements`
  `protected FBManagedConnection`
  `mc`
  `protected final InternalTransactionCoordinator`
  `txCoordinator`

  ### Fields inherited from interface java.sql.Connection

  `TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FBConnection(FBManagedConnection mc)`
  Create a new FBConnection instance based on a `FBManagedConnection`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `abort(Executor executor)`
  `void`
  `addWarning(SQLWarning warning)`
  `protected void`
  `checkValidity()`
  Check if this connection is valid.
  `void`
  `clearWarnings()`
  `void`
  `close()`
  `void`
  `commit()`
  `DatabaseConnectionProperties`
  `connectionProperties()`
  Get database connection properties for this connection.
  `Array`
  `createArrayOf(String typeName, Object[] elements)`
  `Blob`
  `createBlob()`
  `Clob`
  `createClob()`
  `NClob`
  `createNClob()`
  `SQLXML`
  `createSQLXML()`
  `Statement`
  `createStatement()`
  `Statement`
  `createStatement(int resultSetType, int resultSetConcurrency)`
  `Statement`
  `createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
  `Struct`
  `createStruct(String typeName, Object[] attributes)`
  `TransactionParameterBuffer`
  `createTransactionParameterBuffer()`
  Create new instance of `TransactionParameterBuffer`.
  `protected void`
  `freeStatements()`
  This method closes all active statements and cleans resources.
  `boolean`
  `getAutoCommit()`
  `String`
  `getCatalog()`
  `Properties`
  `getClientInfo()`
  `String`
  `getClientInfo(String name)`
  `FbDatabase`
  `getFbDatabase()`
  Provides access to the low-level connection handle.
  `GDSHelper`
  `getGDSHelper()`
  `int`
  `getHoldability()`
  `FBLocalTransaction`
  `getLocalTransaction()`
  Returns a FBLocalTransaction instance that enables a component to demarcate resource manager local transactions on this connection.
  `FBManagedConnection`
  `getManagedConnection()`
  `DatabaseMetaData`
  `getMetaData()`
  `int`
  `getNetworkTimeout()`
  `String`
  `getSchema()`
  `int`
  `getTransactionIsolation()`
  `TransactionParameterBuffer`
  `getTransactionParameters(int isolationLevel)`
  Get transaction parameters for the specified transaction isolation level.
  `Map<String,Class<?>>`
  `getTypeMap()`
  `SQLWarning`
  `getWarnings()`
  `protected void`
  `invalidateSavepoints()`
  Invalidate all savepoints.
  `protected void`
  `invalidateTransactionLifetimeObjects()`
  Invalidate everything that should only last for the lifetime of the current transaction.
  `boolean`
  `isClosed()`
  `protected final boolean`
  `isLockedByCurrentThread()`
  `boolean`
  `isReadOnly()`
  `boolean`
  `isUseFirebirdAutoCommit()`
  `boolean`
  `isValid(int timeout)`
  `boolean`
  `isWrapperFor(Class<?> iface)`
  `String`
  `nativeSQL(String sql)`
  `CallableStatement`
  `prepareCall(String sql)`
  `CallableStatement`
  `prepareCall(String sql, int resultSetType, int resultSetConcurrency)`
  `CallableStatement`
  `prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
  `PreparedStatement`
  `prepareStatement(String sql)`
  `PreparedStatement`
  `prepareStatement(String sql, int autoGeneratedKeys)`
  `PreparedStatement`
  `prepareStatement(String sql, int[] columnIndexes)`
  `PreparedStatement`
  `prepareStatement(String sql, int resultSetType, int resultSetConcurrency)`
  `PreparedStatement`
  `prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
  `protected PreparedStatement`
  `prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean metaData, boolean generatedKeys)`
  `PreparedStatement`
  `prepareStatement(String sql, String[] columnNames)`
  `void`
  `releaseSavepoint(Savepoint savepoint)`
  `void`
  `resetKnownClientInfoProperties()`
  Resets the known client info properties of this connection to the defaults.
  `void`
  `rollback()`
  `void`
  `rollback(Savepoint savepoint)`
  `void`
  `setAutoCommit(boolean autoCommit)`
  `void`
  `setCatalog(String catalog)`
  `void`
  `setClientInfo(String name, String value)`
  `void`
  `setClientInfo(Properties properties)`
  `void`
  `setHoldability(int holdability)`
  `void`
  `setManagedConnection(FBManagedConnection mc)`
  Set the `FBManagedConnection` around which this connection is based.
  `void`
  `setManagedEnvironment(boolean managedConnection)`
  `void`
  `setNetworkTimeout(Executor executor, int milliseconds)`
  `void`
  `setReadOnly(boolean readOnly)`
  `Savepoint`
  `setSavepoint()`
  `Savepoint`
  `setSavepoint(String name)`
  Creates a named savepoint.
  `void`
  `setSchema(String schema)`
  `protected void`
  `setTransactionCoordinator(boolean managedConnection, boolean autoCommit)`
  `void`
  `setTransactionIsolation(int level)`
  `void`
  `setTransactionParameters(int isolationLevel, int[] parameters)`
  Deprecated.
  `void`
  `setTransactionParameters(int isolationLevel, TransactionParameterBuffer tpb)`
  Set transaction parameters for the specified transaction isolation level.
  `void`
  `setTransactionParameters(TransactionParameterBuffer tpb)`
  Set transaction parameters for the next transactions.
  `void`
  `setTypeMap(Map<String,Class<?>> map)`
  `<T> T`
  `unwrap(Class<T> iface)`
  `protected final LockCloseable`
  `withLock()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.sql.Connection

  `beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid`

- ## Field Details

  - ### mc

    protected volatile FBManagedConnection mc

  - ### txCoordinator

    protected final InternalTransactionCoordinator txCoordinator

  - ### activeStatements

    protected final Set<Statement> activeStatements

- ## Constructor Details

  - ### FBConnection

    public FBConnection(FBManagedConnection mc)
    Create a new FBConnection instance based on a `FBManagedConnection`.
    Parameters:
      `mc` - A FBManagedConnection around which this connection is based

- ## Method Details

  - ### getHoldability

    public int getHoldability() throws SQLException
    Specified by:
      `getHoldability` in interface `Connection`
    Throws:
      `SQLException`

  - ### setHoldability

    public void setHoldability(int holdability) throws SQLException
    Specified by:
      `setHoldability` in interface `Connection`
    Throws:
      `SQLException`

  - ### checkValidity

    protected void checkValidity() throws SQLException
    Check if this connection is valid. This method should be invoked before executing any action in this class.
    Throws:
      `SQLException` - if this connection has been closed and cannot be used anymore

  - ### freeStatements

    protected void freeStatements() throws SQLException
    This method closes all active statements and cleans resources.
    Throws:
      `SQLException` - if at least one of the active statements failed to close gracefully.

  - ### setManagedConnection

    public void setManagedConnection(FBManagedConnection mc)
    Set the `FBManagedConnection` around which this connection is based.
    Parameters:
      `mc` - The FBManagedConnection around which this connection is based

  - ### getManagedConnection

    public FBManagedConnection getManagedConnection()

  - ### getFbDatabase

    public FbDatabase getFbDatabase() throws SQLException
    Description copied from interface: `FirebirdConnection`
    Provides access to the low-level connection handle.

    WARNING using this connection handle directly may bring the JDBC connection in an inconsistent state.

    Specified by:
      `getFbDatabase` in interface `FirebirdConnection`
    Returns:
      The low-level connection handle.
    Throws:
      `SQLException`

  - ### connectionProperties

    public DatabaseConnectionProperties connectionProperties()
    Get database connection properties for this connection.
    Returns:
      immutable instance of `DatabaseConnectionProperties`.

  - ### setTransactionParameters

    @Deprecated(since="2") public void setTransactionParameters(int isolationLevel, int[] parameters) throws SQLException
    Deprecated.
    Description copied from interface: `FirebirdConnection`
    Set transaction parameters for the specified isolation level. They will take effect only on the newly started transaction.
    Specified by:
      `setTransactionParameters` in interface `FirebirdConnection`
    Parameters:
      `isolationLevel` - JDBC isolation level.
      `parameters` - array of TPB parameters, see all TPB_* constants.
    Throws:
      `SQLException` - if specified transaction parameters cannot be set.

  - ### getTransactionParameters

    public TransactionParameterBuffer getTransactionParameters(int isolationLevel) throws SQLException
    Description copied from interface: `FirebirdConnection`
    Get transaction parameters for the specified transaction isolation level.
    Specified by:
      `getTransactionParameters` in interface `FirebirdConnection`
    Parameters:
      `isolationLevel` - isolation level defined in the `Connection` interface.
    Returns:
      instance of `TransactionParameterBuffer` containing current transaction parameters.
    Throws:
      `SQLException` - if error occurred obtaining transaction parameters.

  - ### createTransactionParameterBuffer

    public TransactionParameterBuffer createTransactionParameterBuffer() throws SQLException
    Description copied from interface: `FirebirdConnection`
    Create new instance of `TransactionParameterBuffer`.
    Specified by:
      `createTransactionParameterBuffer` in interface `FirebirdConnection`
    Returns:
      empty instance of `TransactionParameterBuffer`.
    Throws:
      `SQLException` - if error occurred during this operation.

  - ### setTransactionParameters

    public void setTransactionParameters(int isolationLevel, TransactionParameterBuffer tpb) throws SQLException
    Description copied from interface: `FirebirdConnection`
    Set transaction parameters for the specified transaction isolation level.

    This method replaces the default TPB mapping with the specified one, changes will be effective from the next transaction start.

    Specified by:
      `setTransactionParameters` in interface `FirebirdConnection`
      `tpb` - instance of `TransactionParameterBuffer` with parameters to set.
    Throws:
      `SQLException` - if error occurred during this operation.

  - ### setTransactionParameters

    public void setTransactionParameters(TransactionParameterBuffer tpb) throws SQLException
    Description copied from interface: `FirebirdConnection`
    Set transaction parameters for the next transactions.

    This method does not change the TPB mapping, but replaces the mapping for the current transaction isolation until `Connection.setTransactionIsolation(int)` is called.

    This method cannot be called when a transaction is currently active.

    Specified by:
      `setTransactionParameters` in interface `FirebirdConnection`
    Parameters:
      `tpb` - instance of `TransactionParameterBuffer` with new transaction parameters.
    Throws:
      `SQLException` - if method is called within a transaction.

  - ### createStatement

    public Statement createStatement() throws SQLException
    Specified by:
      `createStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareStatement

    public PreparedStatement prepareStatement(String sql) throws SQLException
    Specified by:
      `prepareStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareCall

    public CallableStatement prepareCall(String sql) throws SQLException
    Specified by:
      `prepareCall` in interface `Connection`
    Throws:
      `SQLException`

  - ### createBlob

    public Blob createBlob() throws SQLException
    Description copied from interface: `FirebirdConnection`
    Specified by:
      `createBlob` in interface `Connection`
    Specified by:
      `createBlob` in interface `FirebirdConnection`
    Returns:
      instance of `FirebirdBlob`.
    Throws:
      `SQLException`

  - ### createClob

    public Clob createClob() throws SQLException
    Specified by:
      `createClob` in interface `Connection`
    Throws:
      `SQLException`

  - ### createStruct

    public Struct createStruct(String typeName, Object[] attributes) throws SQLException
    Specified by:
      `createStruct` in interface `Connection`
    Throws:
      `SQLException`

  - ### createArrayOf

    public Array createArrayOf(String typeName, Object[] elements) throws SQLException
    Specified by:
      `createArrayOf` in interface `Connection`
    Throws:
      `SQLException`

  - ### nativeSQL

    public String nativeSQL(String sql) throws SQLException
    Specified by:
      `nativeSQL` in interface `Connection`
    Throws:
      `SQLException`

  - ### setAutoCommit

    public void setAutoCommit(boolean autoCommit) throws SQLException
    Specified by:
      `setAutoCommit` in interface `Connection`
    Throws:
      `SQLException`

  - ### setTransactionCoordinator

    protected void setTransactionCoordinator(boolean managedConnection, boolean autoCommit) throws SQLException
    Throws:
      `SQLException`

  - ### setManagedEnvironment

    public void setManagedEnvironment(boolean managedConnection) throws SQLException
    Throws:
      `SQLException`

  - ### getAutoCommit

    public boolean getAutoCommit() throws SQLException
    Specified by:
      `getAutoCommit` in interface `Connection`
    Throws:
      `SQLException`

  - ### commit

    public void commit() throws SQLException
    Specified by:
      `commit` in interface `Connection`
    Throws:
      `SQLException`

  - ### rollback

    public void rollback() throws SQLException
    Specified by:
      `rollback` in interface `Connection`
    Throws:
      `SQLException`

  - ### invalidateTransactionLifetimeObjects

    protected void invalidateTransactionLifetimeObjects()
    Invalidate everything that should only last for the lifetime of the current transaction.

  - ### close

    public void close() throws SQLException

    Implementation note: Certain fatal errors also result in a closed Connection.

    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Connection`
    Throws:
      `SQLException`

  - ### isClosed

    public boolean isClosed()
    Specified by:
      `isClosed` in interface `Connection`

  - ### isValid

    public boolean isValid(int timeout) throws SQLException
    Specified by:
      `isValid` in interface `Connection`
    Throws:
      `SQLException`

  - ### getMetaData

    public DatabaseMetaData getMetaData() throws SQLException
    Specified by:
      `getMetaData` in interface `Connection`
    Throws:
      `SQLException`

  - ### setReadOnly

    public void setReadOnly(boolean readOnly) throws SQLException
    Specified by:
      `setReadOnly` in interface `Connection`
    Throws:
      `SQLException`

  - ### isReadOnly

    public boolean isReadOnly() throws SQLException
    Specified by:
      `isReadOnly` in interface `Connection`
    Throws:
      `SQLException`

  - ### setCatalog

    public void setCatalog(String catalog) throws SQLException

    Implementation ignores calls to this method as catalogs are not supported.

    Specified by:
      `setCatalog` in interface `Connection`
    Throws:
      `SQLException`

  - ### getCatalog

    public String getCatalog() throws SQLException
    Specified by:
      `getCatalog` in interface `Connection`
    Returns:
      Always `null` as catalogs are not supported.
    Throws:
      `SQLException`

  - ### setTransactionIsolation

    public void setTransactionIsolation(int level) throws SQLException
    Specified by:
      `setTransactionIsolation` in interface `Connection`
    Throws:
      `SQLException`

  - ### getTransactionIsolation

    public int getTransactionIsolation() throws SQLException
    Specified by:
      `getTransactionIsolation` in interface `Connection`
    Throws:
      `SQLException`

  - ### getWarnings

    public SQLWarning getWarnings() throws SQLException

    If connection property `reportSQLWarnings` is set to `NONE` (case-insensitive), this method will not report warnings and always return `null`.

    Specified by:
      `getWarnings` in interface `Connection`
    Throws:
      `SQLException`

  - ### clearWarnings

    public void clearWarnings() throws SQLException
    Specified by:
      `clearWarnings` in interface `Connection`
    Throws:
      `SQLException`

  - ### createStatement

    public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
    Specified by:
      `createStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### createStatement

    public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
    Specified by:
      `createStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareStatement

    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
    Specified by:
      `prepareStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareStatement

    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
    Specified by:
      `prepareStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareStatement

    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
    Specified by:
      `prepareStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareStatement

    public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
    Specified by:
      `prepareStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareStatement

    public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
    Specified by:
      `prepareStatement` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareStatement

    protected PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean metaData, boolean generatedKeys) throws SQLException
    Throws:
      `SQLException`

  - ### prepareCall

    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
    Specified by:
      `prepareCall` in interface `Connection`
    Throws:
      `SQLException`

  - ### prepareCall

    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
    Specified by:
      `prepareCall` in interface `Connection`
    Throws:
      `SQLException`

  - ### getTypeMap

    public Map<String,Class<?>> getTypeMap() throws SQLException
    Specified by:
      `getTypeMap` in interface `Connection`
    Throws:
      `SQLException`

  - ### setTypeMap

    public void setTypeMap(Map<String,Class<?>> map) throws SQLException
    Specified by:
      `setTypeMap` in interface `Connection`
    Throws:
      `SQLException`

  - ### setSavepoint

    public Savepoint setSavepoint() throws SQLException
    Specified by:
      `setSavepoint` in interface `Connection`
    Throws:
      `SQLException`

  - ### setSavepoint

    public Savepoint setSavepoint(String name) throws SQLException
    Creates a named savepoint.

    Savepoint names need to be valid Firebird identifiers, and the maximum length is restricted to the maximum identifier length (see `DatabaseMetaData.getMaxColumnNameLength()`. The implementation will take care of quoting the savepoint name appropriately for the connection dialect. The `name` should be passed unquoted.

    With connection dialect 1, the name is restricted to the rules for unquoted identifier names, that is, its characters are restricted to `A-Za-z0-9$_` and handled case insensitive.

    For dialect 2 and 3, the name is restricted to the rules for Firebird quoted identifiers (essentially any printable character and space is valid), and the name is handled case sensitive.

    Specified by:
      `setSavepoint` in interface `Connection`
    Parameters:
      `name` - Savepoint name
    Returns:
      Savepoint object
    Throws:
      `SQLException` - if a database access error occurs, this method is called while participating in a distributed transaction, this method is called on a closed connection or this `Connection` object is currently in auto-commit mode

  - ### rollback

    public void rollback(Savepoint savepoint) throws SQLException
    Specified by:
      `rollback` in interface `Connection`
    Throws:
      `SQLException`

  - ### releaseSavepoint

    public void releaseSavepoint(Savepoint savepoint) throws SQLException
    Specified by:
      `releaseSavepoint` in interface `Connection`
    Throws:
      `SQLException`

  - ### invalidateSavepoints

    protected void invalidateSavepoints()
    Invalidate all savepoints.

  - ### getLocalTransaction

    public FBLocalTransaction getLocalTransaction()
    Returns a FBLocalTransaction instance that enables a component to demarcate resource manager local transactions on this connection.

  - ### isWrapperFor

    public boolean isWrapperFor(Class<?> iface) throws SQLException
    Specified by:
      `isWrapperFor` in interface `Wrapper`
    Throws:
      `SQLException`

  - ### unwrap

    public <T> T unwrap(Class<T> iface) throws SQLException
    Specified by:
      `unwrap` in interface `Wrapper`
    Throws:
      `SQLException`

  - ### setSchema

    public void setSchema(String schema) throws SQLException

    Implementation ignores calls to this method as schemas are not supported.

    Specified by:
      `setSchema` in interface `Connection`
    Throws:
      `SQLException`

  - ### getSchema

    public String getSchema() throws SQLException
    Specified by:
      `getSchema` in interface `Connection`
    Returns:
      Always `null` as schemas ar not supported
    Throws:
      `SQLException`

  - ### addWarning

    public void addWarning(SQLWarning warning)

  - ### createNClob

    public NClob createNClob() throws SQLException

    Implementation note: This method behaves exactly the same as `createClob()`.

    Specified by:
      `createNClob` in interface `Connection`
    Throws:
      `SQLException`

  - ### createSQLXML

    public SQLXML createSQLXML() throws SQLException
    Specified by:
      `createSQLXML` in interface `Connection`
    Throws:
      `SQLException`

  - ### getGDSHelper

    public GDSHelper getGDSHelper() throws SQLException
    Throws:
      `SQLException`

  - ### isUseFirebirdAutoCommit

    public boolean isUseFirebirdAutoCommit()
    Specified by:
      `isUseFirebirdAutoCommit` in interface `FirebirdConnection`
    Returns:
      `true` if this connection is configured to use `isc_tpb_autocommit` when in auto commit.

  - ### getClientInfo

    public Properties getClientInfo() throws SQLException

    Retrieves the known properties of this connection. The initial known properties are `ApplicationName` (with fallback to `CLIENT_PROCESS@SYSTEM`), `ClientUser` (no default value or fallback), and `ClientHostname` (no default value or fallback). Successful retrieval or storing of properties with `getClientInfo(String)`, `setClientInfo(String, String)` and `setClientInfo(Properties)` will register that property as a known property for this connection only.

    When auto-commit is enabled, known properties in context `USER_TRANSACTION` are skipped, and not included in the returned `Properties` object.

    Properties which were registered with suffix `@USER_SESSION` are included in the returned `Properties` object without that suffix. Known properties with value `null` are not included in the returned `Properties` object.

    Specified by:
      `getClientInfo` in interface `Connection`
    Throws:
      `SQLException`
    See Also:
      - `getClientInfo(String)`
      - `setClientInfo(Properties)`

  - ### getClientInfo

    public String getClientInfo(String name) throws SQLException

    Retrieves properties from context `USER_SESSION` or an explicitly specified context with `RDB$GET_CONTEXT`. Names ending in `@USER_SESSION`, `@USER_TRANSACTION` or `@SYSTEM` are handled as `<property-name>@<context-name>`, and the property is retrieved from that context. Bare names are handled the same as `name + "@USER_SESSION"`, unknown or unsupported context suffixes are handled as a property name in `USER_SESSION` (that is `DDL_EVENT@DDL_TRIGGER` is handled as a property with that name in `USER_SESSION`, and not as a property DDL_EVENT in context DDL_TRIGGER, which only exists in PSQL DDL triggers).

    When auto-commit is enabled, properties in context `USER_TRANSACTION` will always return `null`, and no attempts are made to retrieve the property.

    Successful retrieval of a property will register it as a known property for this connection only for use with `getClientInfo()` (i.e. known properties will be retrieved) and `setClientInfo(Properties)` (i.e. if a known property is not included, it will be cleared).

    Specified by:
      `getClientInfo` in interface `Connection`
    Throws:
      `SQLException`

  - ### setClientInfo

    public void setClientInfo(Properties properties) throws SQLClientInfoException

    Sets the properties in `properties` in context `USER_SESSION` or an explicitly specified user context with `RDB$SET_CONTEXT`. See also `getClientInfo(String)` for handling of property names. Absent, but known properties are cleared. Contrary to `setClientInfo(String, String)`, properties in the `SYSTEM` context are silently ignored as they are read-only.

    When auto-commit is enabled, properties in context `USER_TRANSACTION` are silently ignored (they are not set nor cleared).

    Successful setting of properties will register it as a known property for this connection only for use with `getClientInfo()` (i.e. known properties will be retrieved) and `setClientInfo(Properties)` (i.e. if a known property is not included, it will be cleared).

    Specified by:
      `setClientInfo` in interface `Connection`
    Throws:
      `SQLClientInfoException`

  - ### setClientInfo

    public void setClientInfo(String name, String value) throws SQLClientInfoException

    Sets properties in context `USER_SESSION` or an explicitly specified user context with `RDB$SET_CONTEXT`. See also `getClientInfo(String)` for handling of property names.

    When auto-commit is enabled, properties in context `USER_TRANSACTION` will not be set.

    Successful storing of a property will register it as a known property for this connection only for use with `getClientInfo()` (i.e. known properties will be retrieved) and `setClientInfo(Properties)` (i.e. if a known property is not included, it will be cleared).

    Specified by:
      `setClientInfo` in interface `Connection`
    Parameters:
      `name` - name of the client info property to set (cannot be a name ending in `@SYSTEM` as those are read-only)
    Throws:
      `SQLClientInfoException` - if `name` is `null` or ends in `@SYSTEM`, or for database access errors
    See Also:
      - `getClientInfo(String)`

  - ### resetKnownClientInfoProperties

    public void resetKnownClientInfoProperties()
    Description copied from interface: `FirebirdConnection`
    Resets the known client info properties of this connection to the defaults. This does not reset the values of those properties on the server, but only resets the list of known properties held by this connection

    If this connection is closed, this is effectively a no-op. Primary use-case for this method is to reset a connection held in a connection pool.

    Specified by:
      `resetKnownClientInfoProperties` in interface `FirebirdConnection`

  - ### abort

    public void abort(Executor executor) throws SQLException
    Specified by:
      `abort` in interface `Connection`
    Throws:
      `SQLException`

  - ### setNetworkTimeout

    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
    Specified by:
      `setNetworkTimeout` in interface `Connection`
    Throws:
      `SQLException`

  - ### getNetworkTimeout

    public int getNetworkTimeout() throws SQLException
    Specified by:
      `getNetworkTimeout` in interface `Connection`
    Throws:
      `SQLException`

  - ### withLock

    protected final LockCloseable withLock()
    See Also:
      - `FbAttachment.withLock()`

  - ### isLockedByCurrentThread

    protected final boolean isLockedByCurrentThread()