That easy,

look at the DBCP Documentation http://jakarta.apache.org/commons/dbcp/configuration.html
and used the following


<Resource name="jdbc/EmployeeDatabase" auth="Container"
type="javax.sql.DataSource" />
<ResourceParams name="jdbc/EmployeeDatabase">
<parameter>
<name>username</name>
<value>Blah</value>
</parameter>
<parameter>
<name>password</name>
<value>Blah or empty</value>
</parameter>
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.hsqldb.jdbcDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:hsqldb:hsql://localhost</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>8</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>4</value>
</parameter>
<parameter>
<name>validationQuery</name>
<value>SELECT id FROM tomcat_validation WHERE id = 1</value>
</parameter>


</ResourceParams>

As your Database have timeouts or admin downtimes set up the tomcat_validation table with one dummy row
and use also Datasoucre at Realms :-) DBCP has a lot of options to control the connections (s. detail configuration description)


Regards
Peter

http://tomcat.objektpark.org/

D'Alessandro, Arthur schrieb:

May help if you post your resource snipplet (replacing any host /user/passwd info)

-----Original Message-----
From:   Gordon Luk [mailto:[EMAIL PROTECTED]
Sent:   Thu Mar 25 05:30:56 2004
To:     Tomcat Users List
Subject:        Connection Pool setup.

Hi All,

   May be I missing understand the DBCP configuration. Anyone could
help ?
I want my connection pool are Max 100 connection, 10 conn. At start-up,
max idle 10, when idle for 10 min then kill it. Something like that.

Thanks.


Regards,


Gordon Luk



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.639 / Virus Database: 408 - Release Date: 3/22/2004



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










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



Reply via email to