-
-
Notifications
You must be signed in to change notification settings - Fork 23
Connection pool properties
Mark Rotteveel edited this page May 7, 2017
·
3 revisions
This information is outdated
NOTE The connection pool has been deprecated and has been removed in Jaybird 3.0
Connection pooling is available by using JDBC 2 Standard Extension interfaces. Jaybird provides following implementations:
-
javax.sql.DataSource
is implemented byorg.firebirdsql.pool.FBWrappingDataSource
class. -
javax.sql.ConnectionPoolDataSource
andjavax.sql.XADataSource
interfaces are implemented byorg.firebirdsql.pool.FBConnectionPoolDataSource
class.
These classes support properties defined in List of connection properties section. Additionally they support following pooling-related properties:
Standard pool parameters
Property | Description |
---|---|
maxIdleTime |
Maximum time in milliseconds after which idle connection in the pool is closed. |
maxPoolSize |
Maximum number of open physical connections. |
minPoolSize |
Minimum number of open physical connections. If value is greater than 0, corresponding number of connections will be opened when first connection is obtained. |
maxStatements |
Maximum size of prepared statement pool. If 0, statement pooling is switched off. When application requests more statements than can be kept in pool, Jaybird will allow creating that statements, however closing them would not return them back to the pool, but rather immediately release the resources. |
Extended pool parameters
Property | Description |
---|---|
blockingTimeout |
Maximum time in milliseconds during which application can be blocked waiting for a connection from the pool. If no free connection can be obtained, exception is thrown. |
retryInterval |
Period in which pool will try to obtain new connection while blocking the application. |
pooling |
Allows to switch connection pooling off. |
statementPooling |
Allows to switch statement pooling off. |
pingStatement |
Statement that will be used to 'ping' JDBC connection, in other words, to check if it is still alive. This statement must always succeed. Default is SELECT cast(1 AS INTEGER) FROM RDB$DATABASE . |
pingInterval |
Time during which connection is believed to be valid in any case. Pool 'pings' connection before giving it to the application only if more than specified amount of time passed since last 'ping'. |