commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [Configuration] Wish list
Date Mon, 13 Feb 2006 16:43:09 GMT
Borut BolĨina wrote:

> *[2] Inclusion of DatabaseConfiguration in configuration.xml*
> It woould be nice to introduce something like <database> tag in 
> configuration.xml. The content of the tag would be connection string for 
> the database. Example:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <configuration>
>  <xml fileName="prop1.xml"/>
>  <xml fileName="prop2.xml"/>
>  <properties fileName=""/>
>  <database 
> connect="jdbc:mysql://"/>
> </configuration>

For this we might provide a simple way of configuring a 
DatabaseConfiguration by fetching a DataSource through JNDI. The 
configuration descriptor would look like this :

   <database jndi="jdbc/MyDB" table="conf" keyColumn="key" 

We may also propose to configure a DataSource using DBCP with attributes 
specifying a driver name, URL, user and password. But I'm not sure I 
want to enter this territory, sooner or later we'll be asked to provide 
a way of configuring the connection pool, changing the implementation, 
tunning the parameters, etc.. and that's not really the responsibility 
of [configuration]. ConfigurationFactory should remain a simple way or 
building a configuration declaratively, it should not turn into a 
complex configuration framework.

Emmanuel Bourg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message