Subject | Built in pooling added to jca-jdbc driver |
---|---|
Author | David Jencks |
Post date | 2002-01-05T05:56:10Z |
I added built in pooling to the FBWrappingDataSource in the all-java
driver.
To use it, create an FBWrappingDataSource, and configure the
MinSize
MaxSize
BlockingTimeout (milliseconds) or LoginTimeout (seconds)
IdleTimeout (milliseconds) or IdleTimeoutMinutes (minutes)
Pooling = true
When you request your first connection, the pooling mechanism will start
up. After the first connection for a given user is returned, the pool will
create more connections up to minSize.
There is a separate pool for each user you request connections for.
The IdleTimeout feature works like this: there is a thread that looks for
timed out connections, that runs every IdleTimeout/2 milliseconds.
Therefore a connection could be idle for as long as 1.5 * IdleTimeout
before being removed.
BlockingTimeout/LoginTimout only throws an exception if all the connections
in a pool are checked out and none are returned within the specified time:
it does not take any account of time to actually set up the connection with
firebird.
When you are done with a connection, call close() on it, that returns it to
the pool.
If you leave pooling=false (default) you get no pooling, as before: closing
a connection really closes the physical connection to firebird.
Thanks
david jencks
driver.
To use it, create an FBWrappingDataSource, and configure the
MinSize
MaxSize
BlockingTimeout (milliseconds) or LoginTimeout (seconds)
IdleTimeout (milliseconds) or IdleTimeoutMinutes (minutes)
Pooling = true
When you request your first connection, the pooling mechanism will start
up. After the first connection for a given user is returned, the pool will
create more connections up to minSize.
There is a separate pool for each user you request connections for.
The IdleTimeout feature works like this: there is a thread that looks for
timed out connections, that runs every IdleTimeout/2 milliseconds.
Therefore a connection could be idle for as long as 1.5 * IdleTimeout
before being removed.
BlockingTimeout/LoginTimout only throws an exception if all the connections
in a pool are checked out and none are returned within the specified time:
it does not take any account of time to actually set up the connection with
firebird.
When you are done with a connection, call close() on it, that returns it to
the pool.
If you leave pooling=false (default) you get no pooling, as before: closing
a connection really closes the physical connection to firebird.
Thanks
david jencks