[Biojava-dev] BioSQL Connection Pooling
Matthew Pocock
matthew_pocock at yahoo.co.uk
Thu Jul 10 16:46:33 EDT 2003
Sounds good to me. Anybody with more history with the biosql want to
chime in?
Matthew
Simon Foote wrote:
> I've made some modifications to the connection pooling for the BioSQL
> implementation and was wondering if there would be any objections to the
> following:
>
> Change#1: Changed from the simple JDBCConnectionPool that Thomas had
> written to using the apache jakarta commons DBCP and POOL packages to
> provide this support.
>
> Reason:
> More robust system and also allows for change #2 to work correctly
>
> Change#2:
> Modified all the BioSQL implementation packages to use the above pooling
> system via DataSources
>
> Reason:
> Allows developers to either use the jakarta pooling system (should
> work almost transparently, ala the original JDBCConnectionPool) when
> creating a BioSQLSequenceDB or they can create the DB using their own
> pooling system by passing in a DataSource instead of a driver. This 2nd
> option also allows for easy integration into webapps where the
> application server provides its own pooling system.
>
> Code breakage issue: (Although, since the support is fairly recent for
> the latest schema, shouldn't be a big problem)
> Instead of initiating a DB driver instance before creating the
> BioSQLSequenceDB, one only has to pass in the name of the driver in the
> constructor instead. The old constructor will throw this as an
> exception, so should be self-evident as to what has to be done.
>
> Package additions:
> commons-dbcp.jar, commons-pool.jar from the Apache Jakarta Project
> As biojava already has the commons-cli.jar included and the
> LICENSE.COMMONS, I don't see a problem. I will also add the specfics to
> the README like was done for the cli package.
>
> Thoughts and/or comments before CVS commit,
> Simon Foote
>
--
BioJava Consulting LTD - Support and training for BioJava
http://www.biojava.co.uk
More information about the biojava-dev
mailing list