struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Jalenak" <Jerry.Jale...@LABONE.com>
Subject RE: About Datasource
Date Mon, 30 Sep 2002 15:15:35 GMT
Try this....

	<data-sources>
		<data-source key="DataSource1">
			<set-property property="autoCommit"
value="false" />
			<set-property property="driverClass"
value="oracle.jdbc.driver.OracleDriver" />
			<set-property property="maxCount"
value="10" />
			<set-property property="minCount"
value="1" />
			<set-property property="password"
value="<your userID>" />
			<set-property property="url"
value="jdbc:oracle:thin:@????:xxxx:????" />
			<set-property property="user"
value="<your password>" />
		</data-source>
		<data-source key="DataSource2">
			<set-property property="autoCommit"
value="false" />
			<set-property property="driverClass"
value="oracle.jdbc.driver.OracleDriver" />
			<set-property property="maxCount"
value="10" />
			<set-property property="minCount"
value="1" />
			<set-property property="password"
value="<your userID>" />
			<set-property property="url"
value="jdbc:oracle:thin:@????:xxxx:????" />
			<set-property property="user"
value="<your password>" />
		</data-source>	</data-sources>

Then in your Action you can reference the data-source by 

		ds = (DataSource)
servlet.getServletContext().getAttribute("DataSource1");  // or DataSource2,
etc.

HTH,

Jerry

> -----Original Message-----
> From: Tuan H. Le [mailto:tuan.le@phsadc.com]
> Sent: Monday, September 30, 2002 10:08 AM
> To: Struts Users Mailing List
> Subject: RE: About Datasource
> 
> 
> Hi,
> 
> I'm experiencing this same problem. If you have a solution, 
> please post.
> 
> Thanks,
> Tuan 
> 
> -----Original Message-----
> From: Kalaiselvan [mailto:kalaiselvan@HotPOP.com]
> Sent: Monday, September 30, 2002 2:18 AM
> To: Struts Users Mailing List
> Subject: About Datasource
> 
> 
> Hii All,
> 
>         Any one know how to get multiple Datasource from Struts.
> Because i think in Struts-config.xml, we are able to specify only one
> Datasource.
> 
>         Also I got an error when I configure my datasources 
> in tomcat's
> sever.xml <context ></context> I couldnt able to get that 
> datasource name in
> my Strtus's application.But my ordinary application can able to ge the
> Datasources from server.xml. Why this is happend???
> 
> Thanx in Advance
> 
> Kalaiselvna.S
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 

This transmission (and any information attached to it) may be confidential and is intended
solely for the use of the individual or entity to which it is addressed. If you are not the
intended recipient or the person responsible for delivering the transmission to the intended
recipient, be advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is strictly prohibited.
If you have received this transmission in error, please immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message