You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Taylor Cowan <tc...@silverstream.com> on 2002/01/11 19:47:53 UTC
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:rubens@softsite.com.br]
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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: datasources
Posted by Taylor Cowan <tc...@silverstream.com>.
You're right. I'm wrong. From J2EE datasources I just assumed there would
be one, given that it's obvious someone would want to configure more than
one data source, and the method taking a string. Anyone else?
Taylor
-----Original Message-----
From: Rubens Gama [mailto:rubens@softsite.com.br]
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:tcowan@silverstream.com]
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:rubens@softsite.com.br]
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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RES: datasources
Posted by Rubens Gama <ru...@softsite.com.br>.
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:tcowan@silverstream.com]
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:rubens@softsite.com.br]
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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>