[Biojava-dev] JDBCPooledDataSource regression

Thomas Down td2 at sanger.ac.uk
Wed Jan 31 09:53:21 UTC 2007


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.



More information about the biojava-dev mailing list