Did somebody say removeAbandoned was depracated?
<Resource name="jdbc/LinkLibDB" auth="Container" type="javax.sql.DataSource"> </Resource> <ResourceParams name="jdbc/LinkLibDB"> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <!-- MySQL dB username and password for dB connections --> <parameter> <name>username</name> <value>xxxxx</value> </parameter> <parameter> <name>password</name> <value>xxxx</value> </parameter> <!-- Class name for mysql JDBC driver --> <parameter> <name>driverClassName</name> <value>com.mysql.jdbc.Driver</value> </parameter> <!-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. --> <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/linklibrary2</value> </parameter> <parameter> <name>autoReconnect</name> <value>true</value> </parameter> <parameter> <name>useUnicode</name> <value>true</value> </parameter> <parameter> <name>characterEncoding</name> <value>UTF-8</value> </parameter> <!-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. --> <parameter> <name>maxActive</name> <value>100</value> </parameter> <!-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. --> <parameter> <name>maxIdle</name> <value>30</value> </parameter> <!-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. --> <parameter> <name>maxWait</name> <value>10000</value> </parameter> <!-- abandoned dB connections are removed and recycled --> <parameter> <name>removeAbandoned</name> <value>true</value> </parameter> <!-- set the number of seconds a dB connection has been idle before it is considered abandoned. default timeout is 300 seconds.--> <parameter> <name>removeAbandonedTimeout</name> <value>60</value> </parameter> <!-- 'logAbandoned' can be set to true if you want DBCP to log a stack trace of the code which abandoned connections.--> <parameter> <name>logAbandoned</name> <value>true</value> </parameter> </ResourceParams>
On 10/06/2003 03:55 AM Josh G wrote:
Peter Harrison wrote:
A known issue was with putting the resources under either the default context or the global resources. If you do thins you end up with various errors. This might not be the same issue of course. To fix it place the resources in a Context you intend to run under.Unfortunately it's already in a specific context as far as I can tell :( I've downloaded the source to dbcp and it seems it's throwing a SQLException on DriverManager.getDriver(url) but there's no reason I can see that it should, as the url it returns worked just fine when we were doing it the old fashioned way, the only difference is we called getConnection instead of calling getdriver and doing things seperately like dbcp does. Anybody know why getDriver would throw a SQLException where getConnection would not?
This is really starting to get ridiculous, I've spent way too long trying to make this work, and I'm pulling my hair out so to speak.
Cheers, -Josh
-- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
