You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "q.werty@laposte.net" <q....@laposte.net> on 2002/05/03 16:59:30 UTC
DBCP unique file configuration proposal
Hi,
I'am working with DBCP, which work fine. However, I find DBCP
quite difficult to configure for two reasons :
- when using PoolingDriver, configuration is done via JOCL
file. JOCL is a powerfull tool but not intuive in his syntax.
Moreover, it need one configuration file by datasource and we
would like an unique configuration file on serveur
- when using BasicDataSourceFactory via Tomcat, very little
setting are visible and again, it's another configuration place
So we worked on unique and simple configuration file for all
DBCP datasources in JVM and we've got now something that seems
to work and enable us to configure DBCP connections in a single
properties files.
I attach sources files on this mail. If someone find this
usefull, may be this way of configuration be added in DBCP
dictribution.
Some explications on thos files :
- they are just another way to configure DBCP. In other terms,
ACTUAL DBCP FILES ARE NOT IMPACTED, THEY ARE JUST COMPLEMENTARY
FILES.
- configuration is done in 'dbcp-config.properties'. This file
need to be in classpath. If used in Tomcat (our
situation), 'dbcp-config.properties' must be in Tomcat classes
(see catalina.bat, catalina.sh scripts).
- as actuals files, there is thwo way of invoking DBCP :
. directly by driver : use 'ExtendedPoolingDriver' in
replacement of 'PoolingDriver'
. via datasource : use 'ExtendedDatasourceFactory' in
replacement of 'BasicDatasourceFactory'
- all configuration job is done in 'ExtendedPoolConfigurator'
May be there are some errors in 'ExtendedXXX.java' file (and
sure there are ...!), so any critic would be usefull ...
Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 /mn) ; tél : 08 92 68 13 50 (0,34/mn)"