JNDI + Oracle + Pool

2003-03-08 Thread Sebastião Carlos Santos
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
parameternamefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter
parameternameusername/namevaluescott/value/parameter
parameternamepassword/namevalue/value/parameter
parameternamedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value/parameter
parameternameurl/name
  valuejdbc:oracle:thin:@xxx.yyy.zz:1521:AEI/value/parameter
parameternamemaxActive/namevalue3/value/parameter
parameternamemaxIdle/namevalue2/value/parameter
parameternamemaxWait/namevalue1/value/parameter
parameternameremoveAbandoned/namevaluetrue/value/parameter
parameternameremoveAbandonedTimeout/namevalue60/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]



Re: JNDI + Oracle + Pool

2003-03-08 Thread Tomcat-RND
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

Datasourceds=ctxt.lookup();
Connnection con= null;
for(int i=0;i11;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
parameternamefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter
parameternameusername/namevaluescott/value/parameter
parameternamepassword/namevalue/value/parameter
parameternamedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value/parameter
parameternameurl/name

valuejdbc:oracle:thin:@xxx.yyy.zz:1521:AEI/value/parameter
parameternamemaxActive/namevalue3/value/parameter
parameternamemaxIdle/namevalue2/value/parameter
parameternamemaxWait/namevalue1/value/parameter

parameternameremoveAbandoned/namevaluetrue/value/parameter

parameternameremoveAbandonedTimeout/namevalue60/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]



Re: JNDI + Oracle + Pool

2003-03-08 Thread Tarun Ramakrishna Elankath
I guess you would need to test it out. Make a program which in a loop
uses JNDI to get a connection, but doesn't close it.

I guess you would need to set removeAbandoned to false though, if your
test program doesn't hold a reference to every connection that it
obtains.

Hope that helps,
Tarun

On Sat, 2003-03-08 at 17:34,
=?us-ascii?Q?=22Sebasti=E3o_Carlos_Santos=22?= wrote:
 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
 parameternamefactory/name
   
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter
 parameternameusername/namevaluescott/value/parameter
 parameternamepassword/namevalue/value/parameter
 parameternamedriverClassName/name
   valueoracle.jdbc.driver.OracleDriver/value/parameter
 parameternameurl/name
   valuejdbc:oracle:thin:xxx.yyy.zz:1521:AEI/value/parameter
 parameternamemaxActive/namevalue3/value/parameter
 parameternamemaxIdle/namevalue2/value/parameter
 parameternamemaxWait/namevalue1/value/parameter
 parameternameremoveAbandoned/namevaluetrue/value/parameter
 
 parameternameremoveAbandonedTimeout/namevalue60/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?
 Sebastio Carlos Santos
 Oracle Database Administrator - OCP DBA 8i
 Universidade Federal de Uberlndia - UFU
 Gratificao de Estmulo  Docncia - 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]



JNDI + Oracle + Pool

2003-03-07 Thread Sebastião Carlos Santos
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
parameternamefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter
parameternameusername/namevaluescott/value/parameter
parameternamepassword/namevalue/value/parameter
parameternamedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value/parameter
parameternameurl/name
  valuejdbc:oracle:thin:@xxx.yyy.zz:1521:AEI/value/parameter
parameternamemaxActive/namevalue3/value/parameter
parameternamemaxIdle/namevalue2/value/parameter
parameternamemaxWait/namevalue1/value/parameter
parameternameremoveAbandoned/namevaluetrue/value/parameter
parameternameremoveAbandonedTimeout/namevalue60/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]



JNDI + Oracle + Pool

2003-03-07 Thread Sebastião Carlos Santos
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.
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?