Craig, Thank heaven there are humans out there :o)
I do what you describe - here is the snippet: <data-source> <set-property property="autoCommit" value="false"/> <set-property property="description" value="Oracle - 1" /> <set-property property="driverClass" value="oracle.jdbc.driver.OracleDriver" /> <set-property property="maxCount" value="50"/> <set-property property="minCount" value="1"/> <set-property property="url" value="jdbc:oracle:thin:@192.168.0.10:1521:dev" /> <set-property property="user" value="foo"/> <set-property property="password" value="foo"/> </data-source> <data-source> <set-property property="key" value="loadMe"/> <set-property property="autoCommit" value="false"/> <set-property property="description" value="Oracle - 2" /> <set-property property="driverClass" value="oracle.jdbc.driver.OracleDriver" /> <set-property property="maxCount" value="50"/> <set-property property="minCount" value="1"/> <set-property property="url" value="jdbc:oracle:thin:@192.168.0.10:1521:dev" /> <set-property property="user" value="bar"/> <set-property property="password" value="bar"/> </data-source> Then, in the Application class I call: public void initDatabase() { // try to get a db handle DataSource ds = null; Connection dbConn = null; try { ds = super.findDataSource(null); dbConn = ds.getConnection(); } catch (Exception e) { return; } In the end, the log shows GenericDataSource properties being overwritten when the second datasource is processed. The end result is that the erstwhile "default" connection is always pointing to the second datasource and fails to load any data from the first datasource. Perplexing, eh? Thanks for any thought and effort !! Brian ----- Original Message ----- From: "Craig R. McClanahan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, August 30, 2002 1:25 PM Subject: Re: [LISTEN UP] Mailing List Usage > > > On Fri, 30 Aug 2002, Brian Hickey wrote: > > > > > To wit: "Do/did all versions of Struts support multiple datasources?" > > > > "If so, why can I not get ActionServlet.addDataSource to do anything > > other than overwrite the existing GenericDataSource properties?" > > > > You have to specify the "key" property on the <data-source> element to > define what servlet context attribute key is used to store the additional > data sources. Otherwise, they just override the default one. > > Craig > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>