commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@shareowner.com
Subject RE: tomcat jndi + commons-dbcp problem - to Craig
Date Wed, 18 Dec 2002 17:24:47 GMT
Thanks Craig.
 
- I did setup according to the one you mentioned in your posting, web.xml,
server.xml.
- I never got any answer from tomcat user list. Since my issue deals with
commons-dbcp, I posted here instead.
- A typo in my posting, it should be javax.sql.DataSource.
- I placed jdbc2_0-stdext.jar in my application's WEB-INF/lib folder and
classes12.jar in $CATALINA_HOME/common/lib
- The connection returned is org.apache.commons.dbcp.PoolableConnection
neither OraclePoolableConnection nor OracleConnection
 
Question, is org.apache.commons.dbcp.BasicDataSource smart enough to return
an driver-specific connection, in this case, OraclePoolableConnection or
OracleConnection?
 
My web.xml
 
<resource-ref>
            <description>Oracle Datasource</description>
            <res-ref-name>jdbc/abcd</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
</resource-ref>
 
My server.xml
 
<Resource name="jdbc/abcd" auth="Container" type="javax.sql.DataSource"/> 
<ResourceParams name="jdbc/abcd">
<parameter>
            <name>driverClassName</name>
            <value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
            <name>url</name>
            <value>jdbc:oracle:thin:@test:1521:PROD</value>
</parameter>
<parameter>
            <name>username</name>
            <value>web</value>
</parameter>
<parameter>
            <name>password</name>
            <value>web</value>
</parameter>
<parameter>
            <name>maxActive</name>
            <value>20</value>
</parameter>
<parameter>
            <name>maxIdle</name>
            <value>30000</value>
</parameter>
<parameter>
            <name>maxWait</name>
            <value>-1</value>
</parameter>
<parameter>
            <name>removeAbandoned</name>
            <value>true</value>
</parameter>
<parameter>
            <name>removeAbandonedTimeout</name>
            <value>60</value>
</parameter>
</ResourceParams>
 
 
 
Regards,
 
 
 
Phillip Qin
 
"This Guy Thinks He Knows Everything"
Canadian Shareowner
121 Richmond Street W, 7th Floor
Toronto, ON M5H 2K1
(416) 595-9600 ext 291
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message