Thank You Mark: It worked. However, could you explain why the other way didn�t worked?
Hey guys let�s update that manual! Rubens -----Mensagem original----- De: Zeltser, Mark [mailto:[EMAIL PROTECTED]] Enviada em: sexta-feira, 11 de janeiro de 2002 18:27 Para: 'Struts Users Mailing List' Assunto: RE: datasources I am using struts 1.0 and it works for me, however I don't use set-property attribute and assign each property directly. E.g.: <data-sources> <data-source autoCommit="true" description="some db1" key="ds1" .... /> <data-source autoCommit="true" description="some db2" key="ds2" .... /> </data-sources> Mark. -----Original Message----- From: Rubens Gama [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 3:18 PM To: Struts Users Mailing List Subject: RES: datasources Thank you Mark, but It�s not working. I�ve done this: <data-sources> <data-source> <set-property property="key" value="ds1"/> <set-property property="description" value="ds1 Data Source"/> ... ... </data-source> <data-source> <set-property property="key" value="ds2"/> <set-property property="description" value="ds2 Data Source"/> ... ... </data-source> </data-sources> and in my class: action.findDataSource("ds1") But he loads just the "ds2"! Thank you, Rubens -----Mensagem original----- De: Zeltser, Mark [mailto:[EMAIL PROTECTED]] Enviada em: sexta-feira, 11 de janeiro de 2002 18:04 Para: 'Struts Users Mailing List' Assunto: RE: datasources Rubens, You can use key="dataSourceName" attribute in <data-source> tag. To retrieve: ActionServlet.findDataSource( "dataSourceName") Mark. -----Original Message----- From: Rubens Gama [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 2:46 PM To: Struts Users Mailing List Subject: RES: datasources ok, but in the struts-config.xml there isn�t a "name" tag. How can I specify the name of the dataSource ?. For example, this below: <data-sources> <data-source> <set-property property="autoCommit" value="false"/> <set-property property="description" value="Odonto Data Source"/> <set-property property="driverClass" value="sun.jdbc.odbc.JdbcOdbcDriver"/> <set-property property="maxCount" value="10"/> <set-property property="minCount" value="2"/> <set-property property="password" value="foo"/> <set-property property="url" value="jdbc:odbc:odonto"/> <set-property property="user" value="bar"/> </data-source> </data-sources> where is the tag "name" ?? Thank you -----Mensagem original----- De: Taylor Cowan [mailto:[EMAIL PROTECTED]] Enviada em: sexta-feira, 11 de janeiro de 2002 16:48 Para: Struts Users Mailing List Assunto: RE: datasources When you configured the datasource you gave it a name. Use that as a key to lookup the datasoruce using findDataSource( String name ) Taylor -----Original Message----- From: Rubens Gama [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 2:38 PM To: Struts-User Subject: datasources i have two datasources defined in the struts-config.xml. how can i reference each one from my application? for example: servlet.findDataSource(1) or servlet.findDataSource(2) thanks in advance -- 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> ---------------------------------------------------------------------------- -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -- 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]> ---------------------------------------------------------------------------- -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -- 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]>

