you can try this:

 <data-sources>
   <data-source
type="org.apache.commons.dbcp.BasicDataSource"
key="myDS">
     <set-property property="description"
value="Commons DBCP DataSource configuration"/>
     <set-property property="driverClassName"
value="org.gjt.mm.mysql.Driver"/>
     <set-property property="maxActive" value="3"/>
     <set-property property="maxIdle" value="3"/>
     <set-property property="maxWait" value="5"/>
     <set-property property="username"
value="username"/>
     <set-property property="url"
value="jdbc:mysql://localhost/mydb"/>
     <set-property property="removeAbandoned"
value="true"/>
     <set-property property="removeAbandonedTimeout"
value="5"/>
   </data-source>
 </data-sources>


then you will be able to get the data source as
servletContext attirbute under "myDS" key.


--- "HARI,SANJAYAGANESH (HP-India,ex2)"
<[EMAIL PROTECTED]> wrote:
> Hi !
> 
> I see that there is a way to configure dtaasources
> in struts. I am using
> DBCP separately and would like to configure it to be
> used via struts data
> source settings. But my question is , will I be able
> to get rid of the JOCL
> file of DBCP and still exploit all DBCP features by
> configuring it via the
> struts configuration file? I doubt this, beacause I
> cant configure DB ping
> query, prepared statement pools etc. via struts
> datasource configuration
> file (which I can do only via JOCL). Am I right?
> 
> Thanks
> Sanjay
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to