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]>

Reply via email to