RE: Database datasource runtime configuration
You could create an XML configuration file and then parse it with commons-digester(filling a Java Object with the XML relevant information). I used this technique creating a class as a Struts PlugIn which parse an XML configuration file and fill the resource my application needs. Regards, Marco > -Original Message- > From: Joao Araujo [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 08, 2003 3:52 AM > To: [EMAIL PROTECTED] > Subject: Database datasource runtime configuration > > > > Hi, > > > I am using the configuration of the datasource/database > inside the > struts-config.xml file. > That 's been giving me some backwards. For example I > wish to change the > hostname > after installing the whole software. I, then, need to > open the file and > change the configuration > for this. > > I wish I could put this in another file and set the > configuration at run > time. Does anyone know > how to do that? > > SAMPLE CONFIGURATION > > >type="org.apache.commons.dbcp.BasicDataSource"> > > value="oracle.jdbc.driver.OracleDriver" /> > > value="jdbc:oracle:thin:@db.db1.com:1521:" >value="system" /> >value="manager" /> >value="select 1 from dual" /> >value="DBTEST Data Source > Configuration"/> > > >value="false"/> > > > > Thanks, > > Joao, > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database datasource runtime configuration
use database pooling dbcp from jakarta commons instead - has connection pooling and works like a charm + super setup description(despite some flaws, but no problem for us being experienced ones ;-) ). -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED] Sent: Samstag, 08. März 2003 04:52 To: [EMAIL PROTECTED] Subject: Database datasource runtime configuration Hi, I am using the configuration of the datasource/database inside the struts-config.xml file. That 's been giving me some backwards. For example I wish to change the hostname after installing the whole software. I, then, need to open the file and change the configuration for this. I wish I could put this in another file and set the configuration at run time. Does anyone know how to do that? SAMPLE CONFIGURATION Thanks, Joao, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]