[Biojava-dev] JDBCPooledDataSource regression

Andy Yates ayates at ebi.ac.uk
Wed Jan 31 12:56:29 UTC 2007



Thomas Down wrote:
> 
> On 31 Jan 2007, at 12:28, Andy Yates wrote:
>>>
>>> Hmmm, I was assuming that BasicDataSource didn't actually do any pooling
>>> itself, and that you needed another layer on top to manage a connection
>>> pool -- that seems to be how all previous revisions of
>>> JDBCConnectionPool worked, so I guess I wasn't alone in thinking this.
>>> But yes, BasicDataSource does seem to do pooling itself (confirmed by
>>> reading the source), so maybe your simpler version is a better idea.  It
>>> certainly works okay for me.
>>>
>>>            Thomas.
>>
>> That's what I thought should have happened :). Can I suggest that this
>> revised version goes into CVS? Anyone got any objections?
> 
> The one problem I can think of is that this might break any code which 
> relies on DataSource objects having reliable hashCode/equals.  I've 
> found one place where this might be a problem, in 
> OntologySQL.getOntologySQL.  That's a deprecated class, so maybe it's 
> not a big issue -- but it might be worth asking around.
> 
>           Thomas.

If this is a problem then there is nothing wrong I guess with 
subclassing BasicDataSource & implementing the hashcode & equals methods 
from there. BasicDataSource gives access to URI/password/username so it 
should be a very simple matter of generating the correct methods. I can 
do that as the submitted version if required

Andy



More information about the biojava-dev mailing list