[Biojava-dev] JDBCPooledDataSource regression

Andy Yates ayates at ebi.ac.uk
Wed Jan 31 11:06:03 UTC 2007


Hi,

I would say that this class' method is trying to do too much. We have a 
method which is creating a BasicDataSource then not bothering to return 
it in favour of a custom one which implements a hashcode & equals 
method. Can you try your test case when it returns the BasicDataSource & 
not the custom one and see if that works please?

Thanks,

Andy Yates

Thomas Down wrote:
> Hi,
> 
> A few weeks ago, this patch removed a couple of apparently-redundant  
> lines from JDBCPooledDataSource:
> 
>                http://code.open-bio.org/cgi/viewcvs.cgi/biojava-live/ 
> src/org/biojava/utils/JDBCPooledDataSource.java.diff? 
> r1=1.2&r2=1.3&cvsroot=biojava
> 
> This change causes at least some DataSource objects created using  
> this class to fail with a NullPointerException the first time a  
> connection is actually requested.  Using biojava-ensembl to access an  
> Ensembl MySQL database demonstrates this problem consistently.   
> Reverting to revision 1.2 of JDBCPooledDataSource.java solves the  
> problem.
> 
> It looks like the PoolableConnectionFactory constructor has a side  
> effect of registering the factory with the specified ObjectPool.   
> This side effect doesn't seem to be documented particularly clearly,  
> but the example code towards the bottom of:
> 
>            http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/ 
> commons/dbcp/package-summary.html#package_description
> 
> seems to rely on this behavior.
> 
> 
> Would it be possible to roll this source file back to revision 1.2?   
> Or, alternatively, is there someone who can set me up with commit  
> access on the new CVS server (I think I still have an account there,  
> but my password doesn't work since the server move).
> 
> Thanks,
> 
>                 Thomas.
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev



More information about the biojava-dev mailing list