Hi,
Write a JSP or servlet in that get the DataSource and connections for the
value, which is greater than the max connections defined for the datasource
in a for loop as :
If Max connections defined are 10
Datasource ds = ctxt.lookup("....");
Connnection con = null;
for(int i=0;i<11;i++){
con = ds.getConnection();
if(con != null){
out.println("Connection obtained for "+(i+1));
}
else{
out.println("Connection failure.....");
}
}
Beacuse, here we are not closing the connections after getting from the
Datasource, they will be active. so for 11th connection it returns null.
Check the same by closing the connection for the 10th connection. You should
be able to get from the DataSource.
I guess it should give you the proper result...
Ragards.
Pratt
----- Original Message -----
From: "Sebasti�o Carlos Santos" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, March 08, 2003 5:34 PM
Subject: JNDI + Oracle + Pool
I am using the Connection pool through JNDI Datasource to connect me to the
database Oracle, however as I can be sure that the pool is working
correctly.
Below it is the configuration of my server.xml for the pool through JNDI
datasource.
<Resource name="jdbc/ged" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/ged">
<parameter><name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value></parameter>
<parameter><name>username</name><value>scott</value></parameter>
<parameter><name>password</name><value>aaaa</value></parameter>
<parameter><name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value></parameter>
<parameter><name>url</name>
<value>jdbc:oracle:thin:@xxx.yyy.zz:1521:AEI</value></parameter>
<parameter><name>maxActive</name><value>3</value></parameter>
<parameter><name>maxIdle</name><value>2</value></parameter>
<parameter><name>maxWait</name><value>10000</value></parameter>
<parameter><name>removeAbandoned</name><value>true</value></parameter>
<parameter><name>removeAbandonedTimeout</name><value>60</value></parameter>
</ResourceParams>
How can I be tested the pool of connections is working correctly, in other
words, if my new requests of connections are being assisted by the pool
instead of happening the creation of new connections?
Sebasti�o Carlos Santos
Oracle Database Administrator - OCP DBA 8i
Universidade Federal de Uberl�ndia - UFU
Gratifica��o de Est�mulo � Doc�ncia - GED
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]