commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cindy Ballreich <ci...@ballreich.net>
Subject RE: DBCP Issues
Date Tue, 15 Apr 2003 17:12:00 GMT
I was having a similar problem with MySQL. Here's my xml...
          <Resource name="jdbc/myDatabase" auth="Container" type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/myDatabase">
            <parameter>
              <name>factory</name>
              <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
            </parameter>
            <parameter>
              <name>username</name>
              <value>dbUser</value>
            </parameter>
            <parameter>
              <name>password</name>
              <value>dbUserPassword</value>
            </parameter>
            <parameter>
              <name>driverClassName</name>
              <value>org.gjt.mm.mysql.Driver</value>
            </parameter>
            <parameter>
              <name>url</name>
              <value>jdbc:mysql://localhost/myDatabase</value>
            </parameter>
            <parameter>
              <name>maxActive</name>
              <value>100</value>
            </parameter>
            <parameter>
              <name>maxIdle</name>
              <value>10</value>
            </parameter>
            <parameter>
              <name>maxWait</name>
              <value>1000</value>
            </parameter>
            <parameter>
              <name>removeAbandoned</name>
              <value>true</value>
            </parameter>
            <parameter>
              <name>removeAbandonedTimeout</name>
              <value>5</value>
            </parameter>
            <parameter>
              <name>logAbandoned</name>
              <value>true</value>
            </parameter>
            <parameter>
              <name>validationQuery</name>
              <value>SELECT 1;</value>
            </parameter>
            <parameter>
              <name>AutoReconnect</name>
              <value>true</value>
            </parameter>
          </ResourceParams>



At 12:46 PM 4/15/03 -0400, Chris Forbis wrote:
>Ok after much research and test case writing is seems that due to something
>with the Oracle jdbc 2 drivers (that come with 8i) and dbcp have a problem
>once and a while and think the database connection is lost (when from the
>oracle side I can see it has not been).  The checkOpen function in DBCP
>throws an exception and my code stops working....  Now that said I would
>like to try the new Oracle JDBC drivers that come with Oracle 9i but I have
>not been able to get them to work.  The pool seems to not be able to create
>any connection for some reason (so it returns nothing but null).  Has anyone
>used a JDBC3 drivers from Oracle (the 9i drivers) with the pool?  If so do
>you have your XML you could share :)
>
>Thanks
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>

Mime
View raw message