tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miguel Angel Mulero Martinez" <miguel-angel.mul...@mad.tecsidel.es>
Subject RE: So, what does it take to register a JDBC driver for a connection pool?
Date Mon, 07 Oct 2002 06:02:14 GMT
To use the jakarta dbcp you must use the factory parameter. My example (it
works perfectly):

   <ResourceParams name="jdbc/dbpool">
      <parameter>
        <name>factory</name>
        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>oracle.jdbc.driver.OracleDriver</value>
      </parameter>
      <parameter>
        <name>url</name>
        <value>jdbc:oracle:thin:@hostvinci:1521:ceei</value>
      </parameter>
      <parameter>
        <name>username</name>
        <value>europa</value>
      </parameter>
      <parameter>
        <name>password</name>
        <value>europa</value>
      </parameter>
      <parameter>
        <name>maxActive</name>
        <value>20</value>
      </parameter>
      <parameter>
        <name>maxIdle</name>
        <value>10</value>
      </parameter>
      <parameter>
        <name>maxWait</name>
        <value>-1</value>
      </parameter>
    </ResourceParams>

-----Mensaje original-----
De: Michael Nicholson [mailto:man@email.unc.edu]
Enviado el: viernes, 04 de octubre de 2002 20:59
Para: Tomcat Users List
Asunto: So, what does it take to register a JDBC driver for a connection
pool?

Or is that even necessary?  (I would think it is...).  I've been trying
to get the DBCP-commons going for a while, and finally got it to find
the correct resource reference, but it still returns a null datasource.
So I started changing things in the server.xml to find out what doesn't
cause my result to change, with the idea that maybe that's where my
error is.  So I can change my driverClassName to anything and get the
exact same result, so my current theory is that this is where the
problem is.  My partial server.xml file is below:

<Resource name="jdbc/myoracle" auth="Container"
type="javax.sql.DataSource" />

          <ResourceParams name="jdbc/myoracle">
            <parameter>
              <name>driverClassName</name>
              <value>oracle.jdbc.driver.OracleDriver</value>
            </parameter>
            <parameter>
              <name>driverName</name>
              <value>jdbc:oracle:thin:@oraclehost.com:1521:ORDB</value>
            </parameter>
            <parameter>
              <name>username</name>
              <value>wahwah</value>
            </parameter>
            <parameter>
              <name>password</name>
              <value>joebillybob</value>
            </parameter>
            <parameter>
              <name>maxActive</name>
              <value>20</value>
            </parameter>
            <parameter>
              <name>maxIdle</name>
              <value>10</value>
            </parameter>
            <parameter>
              <name>maxWait</name>
              <value>-1</value>
            </parameter>
          </ResourceParams>


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


Mime
View raw message