commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
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="prop3.properties"/>
>  <database 
> connect="jdbc:mysql://delovc10.noviforum.si/feeds?user=foo&password=bar"/>
> </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 :

<configuration>
   <database jndi="jdbc/MyDB" table="conf" keyColumn="key" 
valueColumn="value"/>
</configuration>

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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message