Subject Re: [Firebird-Java] Re: problem with Connection-Pooling
Author Carsten Schäfer
Roman Rokytskyy wrote:
>> Now my custumer gets deadlocks from time to time (every few days),
>> i have no conclusion, never have seen this with my application
>> before.
>
>> I thought blocking should only be necessary, if all connections are
>> used.
>
> That's exactly the case.
>
>> But in my getConnection()-method i print out
>> dataSource.getConnectionCount() and it says 0.
>> This means that 0 connections are used when the error occurs or not.
>
> That's probably bad name for the method and absence documentation.
> This method return amount of free connections in the pool. 0 means
> that blocking can occur. In order to be sure, you have also to look on
> workingSize property (it must be equal to maxSize). However it is not
> available in FBWrappingDataSource, only in FBConnectionPoolDataSource.
> I will fix this.
>
Are you really shure about getConnectionCount() ?
When i start my application with minsize = 5 than getConnectionCount()
returns 5,
with minsize = 4 getConnectionCount() returns 4 at the beginning,
when not using my application for some time getConnectionCount() decreases,
so i thought getConnectionCount() returns the current used connections.
(unfortunatly there is no api-doc for getConnectionCount())

Carsten