Tomcat's connection pooling utilizes its JNDI implementation plus
commons-dbcp and pooling, so you have to use whatever the JNDI-datasource
documentation tells you to do, that is

1. type="javax.sql.DataSource"
2.
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
3. Do not define factory, there is default value by Tomcat.

Behind the scene, Tomcat will use BasicDataSource and PoolableConnection
(whose underlying connection is OracleConnection).

If you do wish to use Oracle's connection pooling, I didn't have luck
either. But I tried its connection caching.


Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Alexey Yastremskiy [mailto:[EMAIL PROTECTED]] 
Sent: February 20, 2003 12:04 AM
To: Tomcat Users List
Subject: Oracle connection pooling + Tomcat 4.1.12

Hi.

I've got a problem: I tried to setup oracle connection pooling in my
tomcat configuration, but didn't succeed. I checked Tomcat docs and Oracle
docs to produce this, but nothing helped :(
Does anyone have in production such a configuration, using
Oracle-implemented connection pooling? Please, help me to do the
same...

Here is my configs....

[server.xml]
    ....
        <Resource auth="Container" name="jdbc/DB" scope="Shareable"
type="javax.sql.ConnectionPoolDataSource"/>
        <ResourceParams name="jdbc/DB">
                <parameter>
                        <name>factory</name>
 
<value>oracle.jdbc.pool.OracleDataSourceFactory</value>
                </parameter>
                <parameter>
                        <name>dataSourceName</name>
 
<value>oracle.jdbc.pool.OracleConnectionPoolDataSource</value>
                </parameter>
                <parameter>
                        <name>url</name>
                        <value>jdbc:oracle:thin:@dbserver:1521:SID</value>
                </parameter>
                <parameter>
                        <name>description</name>
                        <value>my datasource</value>
                </parameter>
                <parameter>
                        <name>user</name>
                        <value>...</value>
                </parameter>
                <parameter>
                        <name>password</name>
                        <value>...</value>
                </parameter>
        </ResourceParams>
        ...
[end server.xml]

[web.xml]
         ...
        <resource-env-ref>
                <description>my db</description>
                <resource-env-ref-name>jdbc/DB</resource-env-ref-name>
 
<resource-env-ref-type>javax.sql.ConnectionPoolDataSource</resource-env-ref-
type>
        </resource-env-ref>
        ...
[end web.xml]


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

Reply via email to