[Biojava-dev] JDBCPooledDataSource regression

Andy Yates ayates at ebi.ac.uk
Wed Jan 31 12:50:53 UTC 2007


Okay I've attached the fix here.

I just did this in a text editor but I believe that the imports are 
okay. If you can just do a quick scan as well to make sure I haven't 
deleted anything that was very important.

I'll get on to the helpdesk now as well :)

Andy

Richard Holland wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Andy could you make the change to your local copy of the source file and
> email the file to me, that way I can make sure I don't get it wrong when
> I commit it.
> 
> Richard.
> 
> PS. You should probably have your own CVS account - email the OBF
> helpdesk and ask for one, saying I told you to. :)
> 
> 
> Andy Yates wrote:
>> Thomas Down wrote:
>>> On 31 Jan 2007, at 12:06, Andy Yates wrote:
>>>
>>>> Hi,
>>>>
>>>> Sorry I was meaning if that if that method just becomes:
>>>>
>>>> public static DataSource getDataSource(final String driver,
>>>>                                          final String url,
>>>>                                          final String user,
>>>>                                          final String pass)
>>>>     throws Exception {
>>>>
>>>>     BasicDataSource ds = new BasicDataSource();
>>>>     ds.setUrl(url);
>>>>     ds.setDriverClassName(driver);
>>>>     ds.setUsername(user);
>>>>     ds.setPassword(pass);
>>>>     // Set BasicDataSource properties such as maxActive and maxIdle, 
>>>> as described in
>>>>     // 
>>>> http://jakarta.apache.org/commons/dbcp/api/org/apache/commons/dbcp/BasicDataSource.html 
>>>>
>>>>     ds.setMaxActive(10);
>>>>     ds.setMaxIdle(5);
>>>>     ds.setMaxWait(10000);
>>>>
>>>>     return ds;
>>>>   }
>>>>
>>>> Does that still work?
>>> 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?
>>
>> Andy
>> _______________________________________________
>> biojava-dev mailing list
>> biojava-dev at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFwI5O4C5LeMEKA/QRApbHAJ4pfXb4YqqBdCynKNK2Z3xzgGqcvQCfbl2K
> 6llWxdpbPek1cSCTAakt/5Q=
> =0Zam
> -----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JDBCPooledDataSource.java
Type: text/x-java
Size: 3155 bytes
Desc: not available
Url : http://lists.open-bio.org/pipermail/biojava-dev/attachments/20070131/92151f3e/attachment-0001.bin 


More information about the biojava-dev mailing list