Subject Re: [Firebird-Java] DataExpress problem JayBird 3 Beta
Author Mark Rotteveel
On 22-12-2016 16:32, hugo.larson@... [Firebird-Java] wrote:
> Let me first clarify that I never share a single connection between threads.
> I have a pool with Database object that is used for each thread. Each
> Database instance create a new jdbc connection.
>
> Here I try to explain what setPool Does:
>
> //Take a Database object from pool
> Database db = dbPool.getConn();
>
> //Get Database object from QueryDataSet to be executed
> Database qdsDb = queryDataSet.getQuery().getDatabase();
>
> //Put jdbc connection to the DataBase object belonging to QueryDataSet
> from pool Database object.
> //here Database calls getAutocommit() which can throw throw exception
> qdsDb.setJdbcConnection(db.getJdbcConnection());
>
> execute queryDataSet
>
> return Database to pool.

It looks like you can't remove the connection from the Database instance
of the Query of that queryDataSet after setting it with
setJdbcConnection. Is it be possible that leads to reuse of the
connection outside of your pooling mechanism?

Are there situations where `Database.closeConnection()` is called either
on the `Database` instances in the pool, or those held in the query of
the queryDataSet (maybe when that queryDataSet is closed?)?

> I have noted that the version 2.12 and Beta 2 is actually more stable,
> so you did some improvement.

Good to know, but too bad we haven't eliminated them completely.

--
Mark Rotteveel