RE: Tomcat 4.1 Connection Pooling...

2004-09-30 Thread Shilpa Nalgonda
Thanks a lot to all who helped me with this...
I replaced all new updated jars: commons-dbcp-1.1.2.jar,
commons-pooling.1.2.jar and Classes12.jar, and the scalability problem
(ORA-00020: maximum number of processes (200) exceeded) is gone..

-Original Message-
From: Michael J. Makunas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:37 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Just a thought (and I apologize if this was already mentioned.I
missed the very beginning of the thread), but I would also make sure you
have the latest connection pooling jars. I recently had a problem where
even though I had the tomcat configured to reclaim abandoned
connections, some were still remaining open. Turned out there was a bug
in the dbcp jar and upgrading to the latest solved it.

-Michael

Dale, Matt wrote:
 Every time your application uses a connection it should call the close()
method to return it to the pool. I had a similar problem where over a fairly
short period of time there was a database error which caused the execute to
throw an exception. I had forgotten to put a finally block in that section
so the connection never got closed. Once I put a finally block in with a
con.close() then it solved my problem.

 Ta
 Matt

 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: 28 September 2004 20:04
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...


 how can i check that and how to resolve it...

 -Original Message-
 From: Dale, Matt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 3:06 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...



 Perhaps your application is hanging on to the database connections and not
 returning them to the pool?

 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: 28 September 2004 19:43
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...


 I have updated with classes12.jar, but still i have this problem.  But
Peter
 what ii sthe bug that you
 mentioned, i have the problem of
 java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded


--
** Michael J. Makunas ** http://www.makunas.com/ **


-
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: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
Is it necessary to add this in web.xml, i have configured datasource for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your configuration for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets connection
from datasource and closes() the connection in finally block.  When it gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it
is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it
is
not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am
using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shapira, Yoav

Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server
it
is
set to 500 processes / login.  Plus Oracle support site suggests in
the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it
is
not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
But my application runs fine even with out that entry in web.xml, i am using
Tomcats ConnectionPooling to connect to database..I only have scalability
issue, when i test my application with multiple users i get the ORAcle erro
below..
If only one users is there, then there is no problem...can you please
suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shapira, Yoav

Hi,
The app runs fine because Tomcat tries to accommodate clueless users.
The web.xml snippet you posted is required according to the Servlet
Spec, and that's what you should adhere to.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

But my application runs fine even with out that entry in web.xml, i am
using
Tomcats ConnectionPooling to connect to database..I only have
scalability
issue, when i test my application with multiple users i get the ORAcle
erro
below..
If only one users is there, then there is no problem...can you please
suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java
)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver
Conn
e
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo
nnec
t
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec
tPoo
l
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it
gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.
.

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with
Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the
JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my
Oracle
version is 8i.
I have the same problem on both OS.  I think increasing

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
O.k thanks i'll do that, but what exactly you mean by
Tomcat tries to accommodate clueless users., i did not quite understand..

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:01 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
The app runs fine because Tomcat tries to accommodate clueless users.
The web.xml snippet you posted is required according to the Servlet
Spec, and that's what you should adhere to.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

But my application runs fine even with out that entry in web.xml, i am
using
Tomcats ConnectionPooling to connect to database..I only have
scalability
issue, when i test my application with multiple users i get the ORAcle
erro
below..
If only one users is there, then there is no problem...can you please
suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java
)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver
Conn
e
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo
nnec
t
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec
tPoo
l
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it
gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.
.

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with
Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the
JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Phillip Qin
This error happens when there are too many connections opened. There are too
many connections opened because before you shut down your application, you
don't explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] 
Sent: September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


But my application runs fine even with out that entry in web.xml, i am using
Tomcats ConnectionPooling to connect to database..I only have scalability
issue, when i test my application with multiple users i get the ORAcle erro
below.. If only one users is there, then there is no problem...can you
please suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling. Read
the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at 
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if 
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years 
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC 
DataSources how-to) have always worked for me out of the box.  I've 
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle 
version is 8i. I have the same problem on both OS.  I think increasing 
the number of processes would not help.
This has got

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
I was not aware that i should explicitly close the datasource, but i am
making sure that
i close all the connections by saying Connection.close in the finally
block..can you tell me how to close the datasource and where to do that...


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...


This error happens when there are too many connections opened. There are too
many connections opened because before you shut down your application, you
don't explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


But my application runs fine even with out that entry in web.xml, i am using
Tomcats ConnectionPooling to connect to database..I only have scalability
issue, when i test my application with multiple users i get the ORAcle erro
below.. If only one users is there, then there is no problem...can you
please suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling. Read
the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shapira, Yoav

Hi,
Sometimes we make efforts to make things easier for novice users by
providing features above and beyond those required by the Servlet
Specification.  Examples include this ability to bind JNDI resources
without a web.xml resource-ref, support for symbolic linking to
resources outside the webapp's docBase, support for deploying and
running your app as an exploded directory structure and not just a
packed WAR file, support for specifying that the connector should not
use cookies for session tracking, and the list goes on and on.

It's pretty much guaranteed that every such feature we provide will come
back to bite us in the form of increased maintenance costs.  But it's a
tradeoff we make for the good of the community and to increase the
attractiveness of Tomcat.  Of course, there's a direct correlation
between how easy a product is to use and the average ability of its
users.  It used to be that many people on this mailing list knew the
Servlet Spec fairly well before they posted -- now we have a lot of
posters who appear to have never read it ;)

This a long story and I could go on this tangent for a while, but let's
avoid that as it has nothing to do with your problem.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:01 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

O.k thanks i'll do that, but what exactly you mean by
Tomcat tries to accommodate clueless users., i did not quite
understand..

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:01 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
The app runs fine because Tomcat tries to accommodate clueless users.
The web.xml snippet you posted is required according to the Servlet
Spec, and that's what you should adhere to.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

But my application runs fine even with out that entry in web.xml, i am
using
Tomcats ConnectionPooling to connect to database..I only have
scalability
issue, when i test my application with multiple users i get the ORAcle
erro
below..
If only one users is there, then there is no problem...can you please
suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.jav
a
)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Drive
r
Conn
e
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableC
o
nnec
t
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
e
ctPo
o
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObje
c
tPoo
l
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSou
r
ce.j
a
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.
j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Phillip Qin
For connecion pooling, when you close the connection, you don't actually
close the physical link. After several shutdown/sartup of your application,
open connection accumulates and exceeds Oracle's 200 thus you receive that
SQLException.

To solve your problem, I would implement a ServletContextListener to
initialize connection pool when my context is in the initialization (public
method contextInitialized) and close data source when my context is
destroyed (public method contextDestroyed).

If you have defined loadonstartup servlet in your web.xml, in the destroy
method, explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] 
Sent: September 28, 2004 1:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


I was not aware that i should explicitly close the datasource, but i am
making sure that i close all the connections by saying Connection.close in
the finally block..can you tell me how to close the datasource and where to
do that...


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...


This error happens when there are too many connections opened. There are too
many connections opened because before you shut down your application, you
don't explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


But my application runs fine even with out that entry in web.xml, i am using
Tomcats ConnectionPooling to connect to database..I only have scalability
issue, when i test my application with multiple users i get the ORAcle erro
below.. If only one users is there, then there is no problem...can you
please suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling. Read
the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at 
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if 
possible

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shapira, Yoav

Hi,
Hmm ;)  There's a good reason there's no close method on
javax.sql.DataSource.  There's also a good reason the J2EE spec calls
for the container, not the user, to manage the lifecycle of JNDI
resources such as DataSources.  IF you go with this
ServletContextListener approach to take over lifecycle management of a
server-provided JNDI resource, you'll be in a murky space at best.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:27 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...

For connecion pooling, when you close the connection, you don't
actually
close the physical link. After several shutdown/sartup of your
application,
open connection accumulates and exceeds Oracle's 200 thus you receive
that
SQLException.

To solve your problem, I would implement a ServletContextListener to
initialize connection pool when my context is in the initialization
(public
method contextInitialized) and close data source when my context is
destroyed (public method contextDestroyed).

If you have defined loadonstartup servlet in your web.xml, in the
destroy
method, explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 1:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


I was not aware that i should explicitly close the datasource, but i am
making sure that i close all the connections by saying Connection.close
in
the finally block..can you tell me how to close the datasource and
where to
do that...


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...


This error happens when there are too many connections opened. There
are
too
many connections opened because before you shut down your application,
you
don't explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


But my application runs fine even with out that entry in web.xml, i am
using
Tomcats ConnectionPooling to connect to database..I only have
scalability
issue, when i test my application with multiple users i get the ORAcle
erro
below.. If only one users is there, then there is no problem...can you
please suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java
)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver
Conn
e
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo
nnec
t
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec
tPoo
l
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read
the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my

Re: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Peter Lin
I thought Oracle fixed that bug in their connectionPooling driver back
in 2001. Am I missing something?  Are you using some other driver to
create a pool of jdbc connections to Oracle? sorry for the question if
it's already been answered in earlier messages.

I've used classes112.zip jdbc driver from oracle without any problems
with connection pooling. If you're using classes111.zip driver from
oracle, you should update your driver to the latest.

just in case no one else mentioned it.

peter


On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Hi,
 Hmm ;)  There's a good reason there's no close method on
 javax.sql.DataSource.  There's also a good reason the J2EE spec calls
 for the container, not the user, to manage the lifecycle of JNDI
 resources such as DataSources.  IF you go with this
 ServletContextListener approach to take over lifecycle management of a
 server-provided JNDI resource, you'll be in a murky space at best.
 
 Yoav Shapira
 Millennium Research Informatics
 
 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 For connecion pooling, when you close the connection, you don't
 actually
 close the physical link. After several shutdown/sartup of your
 application,
 open connection accumulates and exceeds Oracle's 200 thus you receive
 that
 SQLException.
 
 To solve your problem, I would implement a ServletContextListener to
 initialize connection pool when my context is in the initialization
 (public
 method contextInitialized) and close data source when my context is
 destroyed (public method contextDestroyed).
 
 If you have defined loadonstartup servlet in your web.xml, in the
 destroy
 method, explicitly close your data source.
 


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use
DBCp for connection Pooling with Tomcat4.1,
i thought classes112 is for 9i...correct me if i am wrong...

-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:01 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


I thought Oracle fixed that bug in their connectionPooling driver back
in 2001. Am I missing something?  Are you using some other driver to
create a pool of jdbc connections to Oracle? sorry for the question if
it's already been answered in earlier messages.

I've used classes112.zip jdbc driver from oracle without any problems
with connection pooling. If you're using classes111.zip driver from
oracle, you should update your driver to the latest.

just in case no one else mentioned it.

peter


On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 Hmm ;)  There's a good reason there's no close method on
 javax.sql.DataSource.  There's also a good reason the J2EE spec calls
 for the container, not the user, to manage the lifecycle of JNDI
 resources such as DataSources.  IF you go with this
 ServletContextListener approach to take over lifecycle management of a
 server-provided JNDI resource, you'll be in a murky space at best.

 Yoav Shapira
 Millennium Research Informatics

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 For connecion pooling, when you close the connection, you don't
 actually
 close the physical link. After several shutdown/sartup of your
 application,
 open connection accumulates and exceeds Oracle's 200 thus you receive
 that
 SQLException.
 
 To solve your problem, I would implement a ServletContextListener to
 initialize connection pool when my context is in the initialization
 (public
 method contextInitialized) and close data source when my context is
 destroyed (public method contextDestroyed).
 
 If you have defined loadonstartup servlet in your web.xml, in the
 destroy
 method, explicitly close your data source.
 


-
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: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shapira, Yoav

Hi,
You're wrong.  You can and should use classes12.zip (renamed to
classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
drivers.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:09 PM
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...

I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
use
DBCp for connection Pooling with Tomcat4.1,
i thought classes112 is for 9i...correct me if i am wrong...

-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:01 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


I thought Oracle fixed that bug in their connectionPooling driver back
in 2001. Am I missing something?  Are you using some other driver to
create a pool of jdbc connections to Oracle? sorry for the question if
it's already been answered in earlier messages.

I've used classes112.zip jdbc driver from oracle without any problems
with connection pooling. If you're using classes111.zip driver from
oracle, you should update your driver to the latest.

just in case no one else mentioned it.

peter


On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
[EMAIL PROTECTED]
wrote:

 Hi,
 Hmm ;)  There's a good reason there's no close method on
 javax.sql.DataSource.  There's also a good reason the J2EE spec calls
 for the container, not the user, to manage the lifecycle of JNDI
 resources such as DataSources.  IF you go with this
 ServletContextListener approach to take over lifecycle management of
a
 server-provided JNDI resource, you'll be in a murky space at best.

 Yoav Shapira
 Millennium Research Informatics

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 For connecion pooling, when you close the connection, you don't
 actually
 close the physical link. After several shutdown/sartup of your
 application,
 open connection accumulates and exceeds Oracle's 200 thus you
receive
 that
 SQLException.
 
 To solve your problem, I would implement a ServletContextListener to
 initialize connection pool when my context is in the initialization
 (public
 method contextInitialized) and close data source when my context is
 destroyed (public method contextDestroyed).
 
 If you have defined loadonstartup servlet in your web.xml, in the
 destroy
 method, explicitly close your data source.
 


-
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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
thanks..

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:17 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
You're wrong.  You can and should use classes12.zip (renamed to
classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
drivers.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:09 PM
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...

I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
use
DBCp for connection Pooling with Tomcat4.1,
i thought classes112 is for 9i...correct me if i am wrong...

-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:01 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


I thought Oracle fixed that bug in their connectionPooling driver back
in 2001. Am I missing something?  Are you using some other driver to
create a pool of jdbc connections to Oracle? sorry for the question if
it's already been answered in earlier messages.

I've used classes112.zip jdbc driver from oracle without any problems
with connection pooling. If you're using classes111.zip driver from
oracle, you should update your driver to the latest.

just in case no one else mentioned it.

peter


On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
[EMAIL PROTECTED]
wrote:

 Hi,
 Hmm ;)  There's a good reason there's no close method on
 javax.sql.DataSource.  There's also a good reason the J2EE spec calls
 for the container, not the user, to manage the lifecycle of JNDI
 resources such as DataSources.  IF you go with this
 ServletContextListener approach to take over lifecycle management of
a
 server-provided JNDI resource, you'll be in a murky space at best.

 Yoav Shapira
 Millennium Research Informatics

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 For connecion pooling, when you close the connection, you don't
 actually
 close the physical link. After several shutdown/sartup of your
 application,
 open connection accumulates and exceeds Oracle's 200 thus you
receive
 that
 SQLException.
 
 To solve your problem, I would implement a ServletContextListener to
 initialize connection pool when my context is in the initialization
 (public
 method contextInitialized) and close data source when my context is
 destroyed (public method contextDestroyed).
 
 If you have defined loadonstartup servlet in your web.xml, in the
 destroy
 method, explicitly close your data source.
 


-
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]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
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: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Peter Lin
Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
 drivers.
 
 Yoav Shapira
 Millennium Research Informatics
 
 
 
 
 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener to
  initialize connection pool when my context is in the initialization
  (public
  method contextInitialized) and close data source when my context is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 
 -
 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]
 
 
 This e-mail, including any attachments, is a confidential business communication, 
 and may contain information that is confidential, proprietary and/or privileged.  
 This e-mail is intended only for the individual(s) to whom it is addressed, and may 
 not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
 the(an) intended recipient, please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 
 
 -
 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: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
I have updated with classes12.jar, but still i have this problem.  But Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded



-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
 drivers.

 Yoav Shapira
 Millennium Research Informatics




 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener to
  initialize connection pool when my context is in the initialization
  (public
  method contextInitialized) and close data source when my context is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 
 -
 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]


 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.




 -
 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]


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Dale, Matt

Perhaps your application is hanging on to the database connections and not returning 
them to the pool?

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 19:43
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...


I have updated with classes12.jar, but still i have this problem.  But Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded



-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
 drivers.

 Yoav Shapira
 Millennium Research Informatics




 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener to
  initialize connection pool when my context is in the initialization
  (public
  method contextInitialized) and close data source when my context is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 
 -
 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]


 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.




 -
 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]


-
To unsubscribe, e-mail: [EMAIL

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shilpa Nalgonda
how can i check that and how to resolve it...

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Perhaps your application is hanging on to the database connections and not
returning them to the pool?

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 19:43
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...


I have updated with classes12.jar, but still i have this problem.  But Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded



-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
 drivers.

 Yoav Shapira
 Millennium Research Informatics




 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener to
  initialize connection pool when my context is in the initialization
  (public
  method contextInitialized) and close data source when my context is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 
 -
 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]


 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.




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

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shapira, Yoav

Hi,
I just had an idea: it could be this is not your application's fault.
We've had these in the past where the DB ran out of processes, for
example if several apps or people were using it at once.  Ask your DB
for a breakdown of where the 200 processes are coming from.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:04 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

how can i check that and how to resolve it...

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Perhaps your application is hanging on to the database connections and
not
returning them to the pool?

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 19:43
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...


I have updated with classes12.jar, but still i have this problem.  But
Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded



-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav
[EMAIL PROTECTED]
wrote:

 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern
ojdbc14.jar
 drivers.

 Yoav Shapira
 Millennium Research Informatics




 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver
back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question
if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any
problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec
calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management
of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener
to
  initialize connection pool when my context is in the
initialization
  (public
  method contextInitialized) and close data source when my context
is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 

-
 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]


 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary
and/or privileged

Re: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Peter Lin
just in case, here's a link to Oracle's developer jdbc section

http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/jdbc30/index.html

just make sure the apps are calling java.sql.Connection.close() when
they are done. the PooledConnection underneath will pass the
connection back to the pool automatically.

an easy way is to use Netstat to see how many connections are open. If
you see the connection increase rapidly, you know it's not being
closed.

peter


On Tue, 28 Sep 2004 15:03:53 -0400, Shilpa Nalgonda
[EMAIL PROTECTED] wrote:
 how can i check that and how to resolve it...


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Dale, Matt

Every time your application uses a connection it should call the close() method to 
return it to the pool. I had a similar problem where over a fairly short period of 
time there was a database error which caused the execute to throw an exception. I had 
forgotten to put a finally block in that section so the connection never got closed. 
Once I put a finally block in with a con.close() then it solved my problem.

Ta
Matt

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 20:04
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


how can i check that and how to resolve it...

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Perhaps your application is hanging on to the database connections and not
returning them to the pool?

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 19:43
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...


I have updated with classes12.jar, but still i have this problem.  But Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded



-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Yoav is correct, you should be using the newer driver and not the
older one.  good thing I asked which version the driver is.

that's a really old bug in the old driver. I remember reporting the
bug back in 99 and the support rep said something like, yeah, lots of
people have been reporting the bug.

peter



On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED]
wrote:

 Hi,
 You're wrong.  You can and should use classes12.zip (renamed to
 classes12.jar) with Oracle 8i.  You can even use the modern ojdbc14.jar
 drivers.

 Yoav Shapira
 Millennium Research Informatics




 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:09 PM
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
 use
 DBCp for connection Pooling with Tomcat4.1,
 i thought classes112 is for 9i...correct me if i am wrong...
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:01 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 I thought Oracle fixed that bug in their connectionPooling driver back
 in 2001. Am I missing something?  Are you using some other driver to
 create a pool of jdbc connections to Oracle? sorry for the question if
 it's already been answered in earlier messages.
 
 I've used classes112.zip jdbc driver from oracle without any problems
 with connection pooling. If you're using classes111.zip driver from
 oracle, you should update your driver to the latest.
 
 just in case no one else mentioned it.
 
 peter
 
 
 On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  Hmm ;)  There's a good reason there's no close method on
  javax.sql.DataSource.  There's also a good reason the J2EE spec calls
  for the container, not the user, to manage the lifecycle of JNDI
  resources such as DataSources.  IF you go with this
  ServletContextListener approach to take over lifecycle management of
 a
  server-provided JNDI resource, you'll be in a murky space at best.
 
  Yoav Shapira
  Millennium Research Informatics
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 1:27 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  For connecion pooling, when you close the connection, you don't
  actually
  close the physical link. After several shutdown/sartup of your
  application,
  open connection accumulates and exceeds Oracle's 200 thus you
 receive
  that
  SQLException.
  
  To solve your problem, I would implement a ServletContextListener to
  initialize connection pool when my context is in the initialization
  (public
  method contextInitialized) and close data source when my context is
  destroyed (public method contextDestroyed).
  
  If you have defined loadonstartup servlet in your web.xml, in the
  destroy
  method, explicitly close your data source.
  
 
 
 -
 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]


 This e-mail, including any attachments, is a confidential business

Re: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Peter Lin
along the same lines, look at Oracle's network logs to see what is happening.

another option is to log into sql and use oracle commands to see how
many connections are open. anyone of these options should give you
more information to track down the problem.

peter


On Tue, 28 Sep 2004 15:11:14 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Hi,
 I just had an idea: it could be this is not your application's fault.
 We've had these in the past where the DB ran out of processes, for
 example if several apps or people were using it at once.  Ask your DB
 for a breakdown of where the 200 processes are coming from.
 
 Yoav Shapira
 Millennium Research Informatics
 
 
 
 
 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 3:04 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 how can i check that and how to resolve it...
 
 -Original Message-
 From: Dale, Matt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 3:06 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 
 
 Perhaps your application is hanging on to the database connections and
 not
 returning them to the pool?
 
 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: 28 September 2004 19:43
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 
 I have updated with classes12.jar, but still i have this problem.  But
 Peter
 what ii sthe bug that you
 mentioned, i have the problem of
 java.sql.SQLException: ORA-00020: maximum number of processes (200)
 exceeded
 
 
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 2:23 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1 Connection Pooling...
 
 
 Yoav is correct, you should be using the newer driver and not the
 older one.  good thing I asked which version the driver is.
 
 that's a really old bug in the old driver. I remember reporting the
 bug back in 99 and the support rep said something like, yeah, lots of
 people have been reporting the bug.
 
 peter
 
 
 
 On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav
 [EMAIL PROTECTED]
 wrote:
 
  Hi,
  You're wrong.  You can and should use classes12.zip (renamed to
  classes12.jar) with Oracle 8i.  You can even use the modern
 ojdbc14.jar
  drivers.
 
  Yoav Shapira
  Millennium Research Informatics
 
 
 
 
  -Original Message-
  From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 2:09 PM
  To: Tomcat Users List; Peter Lin
  Subject: RE: Tomcat 4.1 Connection Pooling...
  
  I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and
  use
  DBCp for connection Pooling with Tomcat4.1,
  i thought classes112 is for 9i...correct me if i am wrong...
  
  -Original Message-
  From: Peter Lin [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 28, 2004 2:01 PM
  To: Tomcat Users List
  Subject: Re: Tomcat 4.1 Connection Pooling...
  
  
  I thought Oracle fixed that bug in their connectionPooling driver
 back
  in 2001. Am I missing something?  Are you using some other driver to
  create a pool of jdbc connections to Oracle? sorry for the question
 if
  it's already been answered in earlier messages.
  
  I've used classes112.zip jdbc driver from oracle without any
 problems
  with connection pooling. If you're using classes111.zip driver from
  oracle, you should update your driver to the latest.
  
  just in case no one else mentioned it.
  
  peter
  
  
  On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav
  [EMAIL PROTECTED]
  wrote:
  
   Hi,
   Hmm ;)  There's a good reason there's no close method on
   javax.sql.DataSource.  There's also a good reason the J2EE spec
 calls
   for the container, not the user, to manage the lifecycle of JNDI
   resources such as DataSources.  IF you go with this
   ServletContextListener approach to take over lifecycle management
 of
  a
   server-provided JNDI resource, you'll be in a murky space at best.
  
   Yoav Shapira
   Millennium Research Informatics
  
   -Original Message-
   From: Phillip Qin [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, September 28, 2004 1:27 PM
   To: 'Tomcat Users List'
   Subject: RE: Tomcat 4.1 Connection Pooling...
   
   For connecion pooling, when you close the connection, you don't
   actually
   close the physical link. After several shutdown/sartup of your
   application,
   open connection accumulates and exceeds Oracle's 200 thus you
  receive
   that
   SQLException.
   
   To solve your problem, I would implement a ServletContextListener
 to
   initialize connection pool when my context is in the
 initialization
   (public
   method contextInitialized) and close data source when my context
 is
   destroyed (public method contextDestroyed).
   
   If you have defined loadonstartup servlet in your web.xml, in the
   destroy
   method, explicitly close your data source

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Phillip Qin
Even though this resource is not in Global scope?


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: September 28, 2004 1:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Hmm ;)  There's a good reason there's no close method on
javax.sql.DataSource.  There's also a good reason the J2EE spec calls for
the container, not the user, to manage the lifecycle of JNDI resources such
as DataSources.  IF you go with this ServletContextListener approach to take
over lifecycle management of a server-provided JNDI resource, you'll be in a
murky space at best.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:27 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...

For connecion pooling, when you close the connection, you don't
actually
close the physical link. After several shutdown/sartup of your
application,
open connection accumulates and exceeds Oracle's 200 thus you receive
that
SQLException.

To solve your problem, I would implement a ServletContextListener to 
initialize connection pool when my context is in the initialization
(public
method contextInitialized) and close data source when my context is 
destroyed (public method contextDestroyed).

If you have defined loadonstartup servlet in your web.xml, in the
destroy
method, explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 1:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


I was not aware that i should explicitly close the datasource, but i am 
making sure that i close all the connections by saying Connection.close
in
the finally block..can you tell me how to close the datasource and
where to
do that...


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...


This error happens when there are too many connections opened. There
are
too
many connections opened because before you shut down your application,
you
don't explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


But my application runs fine even with out that entry in web.xml, i am 
using Tomcats ConnectionPooling to connect to database..I only have
scalability
issue, when i test my application with multiple users i get the ORAcle
erro
below.. If only one users is there, then there is no problem...can you 
please suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200) 
exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at 
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java
)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at 
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver
Conn
e
ctionFactory.java:82)
at 
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo
nnec
t
ionFactory.java:300)
at 
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:816)
at 
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec
tPoo
l
.java:119)
at 
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140)
at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read
the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Thanks.
Maybe its

RE: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Shapira, Yoav

Hi,

Even though this resource is not in Global scope?

Yeah.  What I said applies to any and all container-managed resources.

Yoav



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 1:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Hmm ;)  There's a good reason there's no close method on
javax.sql.DataSource.  There's also a good reason the J2EE spec calls
for
the container, not the user, to manage the lifecycle of JNDI resources
such
as DataSources.  IF you go with this ServletContextListener approach to
take
over lifecycle management of a server-provided JNDI resource, you'll be
in
a
murky space at best.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:27 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...

For connecion pooling, when you close the connection, you don't
actually
close the physical link. After several shutdown/sartup of your
application,
open connection accumulates and exceeds Oracle's 200 thus you receive
that
SQLException.

To solve your problem, I would implement a ServletContextListener to
initialize connection pool when my context is in the initialization
(public
method contextInitialized) and close data source when my context is
destroyed (public method contextDestroyed).

If you have defined loadonstartup servlet in your web.xml, in the
destroy
method, explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 1:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


I was not aware that i should explicitly close the datasource, but i
am
making sure that i close all the connections by saying
Connection.close
in
the finally block..can you tell me how to close the datasource and
where to
do that...


-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.1 Connection Pooling...


This error happens when there are too many connections opened. There
are
too
many connections opened because before you shut down your application,
you
don't explicitly close your data source.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: September 28, 2004 12:55 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


But my application runs fine even with out that entry in web.xml, i am
using Tomcats ConnectionPooling to connect to database..I only have
scalability
issue, when i test my application with multiple users i get the ORAcle
erro
below.. If only one users is there, then there is no problem...can you
please suggest if adding that entry to web.xml will help...

java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.jav
a
)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Drive
r
Conn
e
ctionFactory.java:82)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableC
o
nnec
t
ionFactory.java:300)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
e
ctPo
o
l.java:816)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObje
c
tPoo
l
.java:119)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSou
r
ce.j
a
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.
j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Yes, it's needed if you're using server-provided connection pooling.
Read
the Servlet Specification.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Is it necessary to add this in web.xml, i have configured datasource
for
connectonpool only in server.xml...


web.xml
---
resource-ref
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref



-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat

Re: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Carlos Bracho
  Connection conn = null;
  Statement stmt = null;  // Or PreparedStatement if needed
  ResultSet rs = null;
  try {
conn = //get connection from connection pool ...
stmt = conn.createStatement(select ...);
rs = stmt.executeQuery();
... iterate through the result set ...
rs.close();
rs = null;
stmt.close();
stmt = null;
conn.close(); // Return to connection pool
conn = null;  // Make sure we don't close it twice
  } catch (SQLException e) {
... deal with errors ...
  } finally {
// Always make sure result sets and statements are closed,
// and the connection is returned to the pool
if (rs != null) {
  try { rs.close(); } catch (SQLException e) { ; }
  rs = null;
}
if (stmt != null) {
  try { stmt.close(); } catch (SQLException e) { ; }
  stmt = null;
}
if (conn != null) {
  try { conn.close(); } catch (SQLException e) { ; }
  conn = null;
}
  }


On Tue, 28 Sep 2004 15:28:24 -0400, Phillip Qin
[EMAIL PROTECTED] wrote:
 Even though this resource is not in Global scope?
 
 
 
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: September 28, 2004 1:55 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 Hi,
 Hmm ;)  There's a good reason there's no close method on
 javax.sql.DataSource.  There's also a good reason the J2EE spec calls for
 the container, not the user, to manage the lifecycle of JNDI resources such
 as DataSources.  IF you go with this ServletContextListener approach to take
 over lifecycle management of a server-provided JNDI resource, you'll be in a
 murky space at best.
 
 Yoav Shapira
 Millennium Research Informatics
 
 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:27 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 For connecion pooling, when you close the connection, you don't
 actually
 close the physical link. After several shutdown/sartup of your
 application,
 open connection accumulates and exceeds Oracle's 200 thus you receive
 that
 SQLException.
 
 To solve your problem, I would implement a ServletContextListener to
 initialize connection pool when my context is in the initialization
 (public
 method contextInitialized) and close data source when my context is
 destroyed (public method contextDestroyed).
 
 If you have defined loadonstartup servlet in your web.xml, in the
 destroy
 method, explicitly close your data source.
 
 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: September 28, 2004 1:06 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 
 I was not aware that i should explicitly close the datasource, but i am
 making sure that i close all the connections by saying Connection.close
 in
 the finally block..can you tell me how to close the datasource and
 where to
 do that...
 
 
 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 1:06 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 
 This error happens when there are too many connections opened. There
 are
 too
 many connections opened because before you shut down your application,
 you
 don't explicitly close your data source.
 
 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: September 28, 2004 12:55 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...
 
 
 But my application runs fine even with out that entry in web.xml, i am
 using Tomcats ConnectionPooling to connect to database..I only have
 scalability
 issue, when i test my application with multiple users i get the ORAcle
 erro
 below.. If only one users is there, then there is no problem...can you
 please suggest if adding that entry to web.xml will help...
 
 java.sql.SQLException: ORA-00020: maximum number of processes (200)
 exceeded
 
 at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
 at oracle.jdbc.ttc7.O3log.receive1st(O3log.java)
 at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
 at
 oracle.jdbc.driver.OracleConnection.init(OracleConnection.java)
 at
 oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java
 )
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
 at
 org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver
 Conn
 e
 ctionFactory.java:82)
 at
 org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo
 nnec
 t
 ionFactory.java:300)
 at
 org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
 ctPo
 o
 l.java:816)
 at
 org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec
 tPoo
 l
 .java:119)
 at
 org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
 ce.j
 a
 va:140

Re: Tomcat 4.1 Connection Pooling...

2004-09-28 Thread Michael J. Makunas
Just a thought (and I apologize if this was already mentioned.I 
missed the very beginning of the thread), but I would also make sure you 
have the latest connection pooling jars. I recently had a problem where 
even though I had the tomcat configured to reclaim abandoned 
connections, some were still remaining open. Turned out there was a bug 
in the dbcp jar and upgrading to the latest solved it.

-Michael
Dale, Matt wrote:
Every time your application uses a connection it should call the close() method to 
return it to the pool. I had a similar problem where over a fairly short period of 
time there was a database error which caused the execute to throw an exception. I had 
forgotten to put a finally block in that section so the connection never got closed. 
Once I put a finally block in with a con.close() then it solved my problem.
Ta
Matt
-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 20:04
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...
how can i check that and how to resolve it...
-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:06 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Perhaps your application is hanging on to the database connections and not
returning them to the pool?
-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: 28 September 2004 19:43
To: Tomcat Users List; Peter Lin
Subject: RE: Tomcat 4.1 Connection Pooling...
I have updated with classes12.jar, but still i have this problem.  But Peter
what ii sthe bug that you
mentioned, i have the problem of
java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded
--
** Michael J. Makunas ** http://www.makunas.com/ **
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well if you
are running 9i.  These are all system settings that can be found in smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
xmlrpc-oemapi--
debug=5 reloadable=true crossContext=true useNaming=true

prefix=localhost_rpcoemapi_log. suffix=.txt
timestamp=true/
auth=Container
type=javax.sql.DataSource/




factory
org.apache.commons.dbcp.BasicDataSourceFactory



 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --


maxActive
5



 Set to 0 for no limit.
 --


maxIdle
2



 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --


maxWait
1






username
ioeadmin




password
ioeadmin






driverClassName
oracle.jdbc.driver.OracleDriver



 The autoReconnect=true argument to the url makes sure that the
 mm.mysql

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Can anyone give me advice on the set up of Tomcat4.1 connection pooling
parameters...

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well if you
are running 9i.  These are all system settings that can be found in smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
xmlrpc-oemapi--
debug=5 reloadable=true crossContext=true useNaming=true

prefix=localhost_rpcoemapi_log. suffix=.txt
timestamp=true/
auth=Container
type=javax.sql.DataSource/




factory
org.apache.commons.dbcp.BasicDataSourceFactory



 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --


maxActive
5



 Set to 0 for no limit.
 --


maxIdle
2



 in ms, in this example 10 seconds. An Exception is thrown

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well if you
are running 9i.  These are all system settings that can be found in smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
xmlrpc-oemapi--
debug=5 reloadable=true crossContext=true useNaming=true

prefix=localhost_rpcoemapi_log. suffix=.txt
timestamp=true/
auth=Container
type=javax.sql.DataSource/




factory
org.apache.commons.dbcp.BasicDataSourceFactory



 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --


maxActive
5



 Set to 0 for no limit.
 --


maxIdle
2



 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shapira, Yoav

Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it
is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it
is
not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am
using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
ava:
5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:3
9
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImp
l
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shilpa Nalgonda
Thanks.
Maybe its the parameter configuration can you send me your configuration for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets connection
from datasource and closes() the connection in finally block.  When it gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server it
is
set to 500 processes / login.  Plus Oracle support site suggests in the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it
is
not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am
using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje
ctPo
o
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour
ce.j
a
va:140

RE: Tomcat 4.1 Connection Pooling...

2004-09-22 Thread Shapira, Yoav

Hi,
My configurations tend to be very similar to those in the documentation.
Check the DBCP (http://jakarta.apache.org/common/dbcp) site for what the
parameters like maxIdle mean.

My code to look up a DataSource and get a connection is the same as
yours, and the same as the docs.  It's boilerplate: Create an
InitialContext, lookup java:comp/env/whatever your resource name is,
cast it to DataSource, getConnection.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 11:05 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Thanks.
Maybe its the parameter configuration can you send me your
configuration
for
connection pooling...
I am using these parameters...
maxActive :20
maxIdle :10
maxWait :1
removeAbandoned :true  -- what exactly is MaxIdle  parameter..

Also my application makes 7 database queries, each query gets
connection
from datasource and closes() the connection in finally block.  When it
gets
connection from datasource it is supposed to get it from pool right???

I noticed that after my application runs 3 times --(3x7 =21).. it gives
me
this error

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb..

So can you send me ur config and code snippet to get datasource if
possible...


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:55 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...



Hi,
Nope, I can't help unfortunately.  I used Tomcat 4.1 for years
connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat
5.0 and 5.5.  Maybe I'm just lucky, but the docs (specifically the JDBC
DataSources how-to) have always worked for me out of the box.  I've
never seen the error you describe.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...

Hi Yoav Shapira,
Can you put some light on this pooling stuff...
Thanks.
Shilpa.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 9:31 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Hi Cary,
I am running my application on both windowsxp and Linux. And my Oracle
version is 8i.
I have the same problem on both OS.  I think increasing the number of
processes would not help.
This has got something to do with Tomcat connection pooling
configuration.
I am missing some configuration stuff there...
if i use these below parameters in server.xml iget timeout
exception...just
after couple of requests..
maxActive :20
maxIdle :10
mxWait :1
removeAbandoned :true
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object 

And if i use this below configuration i get ORA:00020 exception...
maxActive :0
maxIdle :0
mxWait :0
removeAbandoned :true

Can you please help---i have been looking into this since 2 days and
still
it doesn't work...

-Original Message-
From: Cary Conover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 10:09 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1 Connection Pooling...


Shilpa,

What OS are you running this configuration on?  If it is AIX I would
investigate to see how the system is configured for the number of
processes
per user on the system.  If it is configured as a Workstation it is
defaulted to 128 processes / login.  If it is configured as a server
it
is
set to 500 processes / login.  Plus Oracle support site suggests in
the
neighborhood of 2500 processes / login for Oracle 9i to function well
if
you
are running 9i.  These are all system settings that can be found in
smitty
on the system and adjusted as root user.

Hope this helps,

Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat
4.1.
As per the docs i have
1) configured server.xml to include the resource parameters (
datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it
is
not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection

RE: Tomcat 4.1 Connection Pooling...

2004-09-21 Thread Shilpa Nalgonda
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi,  I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.init(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
!-- JNDI datasource setup to connect to Oracle database for
xmlrpc-oemapi--
Context path=/rpcoemapi docBase=rpcoemapi
debug=5 reloadable=true crossContext=true useNaming=true

Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_rpcoemapi_log. suffix=.txt
 timestamp=true/
   Resource name=jdbc/MYDB
   auth=Container
   type=javax.sql.DataSource/

ResourceParams name=jdbc/MYDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value5/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
 namemaxIdle/name
 value2/value
/parameter

 !-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
 namemaxWait/name
 value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
  nameusername/name
  valueioeadmin/value
/parameter
parameter
  namepassword/name
  valueioeadmin/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --
parameter
nameurl/name
valuejdbc:oracle:thin:@ipaddress:1521:MYDB/value
/parameter
/ResourceParams
/Context


RE: Tomcat 4.1 Connection Pooling...

2004-09-21 Thread Cary Conover
Shilpa,
 
What OS are you running this configuration on?  If it is AIX I would investigate to 
see how the system is configured for the number of processes per user on the system.  
If it is configured as a Workstation it is defaulted to 128 processes / login.  If it 
is configured as a server it is set to 500 processes / login.  Plus Oracle support 
site suggests in the neighborhood of 2500 processes / login for Oracle 9i to function 
well if you are running 9i.  These are all system settings that can be found in smitty 
on the system and adjusted as root user.
 
Hope this helps,
 
Cary

Shilpa Nalgonda [EMAIL PROTECTED] wrote:
Can someone please suggest how to achieve connection Pooling in tomcat 4.1.
As per the docs i have
1) configured server.xml to include the resource parameters ( datasource,
connection pool size etc)
2) In application code , retrieve connection using datasource
3) Every Method call to database retrieves connection
using datasource.getConnection ()
and closes connection everytime

But still the pooling is not achieved, i get ORA-00020 error( maximim
proceses exceeded), i increased the size from 30 to 200) even then it is not
working.

Can someone please help

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:55 PM
To: Tomcat Users List
Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool exhausted, cause:


Hi, I am getting the timeout exception for connection pooling, i am using
Tomca 4.1 and datasource to retrieve connections.
I am attaching all the soure code and configuration files used in my
application, please suggest where iam doing wrong...

SEVERE: getConnection()--SQLException
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted, cause:
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java:801)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:140)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
18)
at
com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46)
at
com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlrpc.Invoker.execute(Invoker.java:168)
at
org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128)
at
com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java

===
server.xml
-
xmlrpc-oemapi--
debug=5 reloadable=true crossContext=true useNaming=true

prefix=localhost_rpcoemapi_log. suffix=.txt
timestamp=true/
auth=Container
type=javax.sql.DataSource/




factory
org.apache.commons.dbcp.BasicDataSourceFactory



 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --


maxActive
5



 Set to 0 for no limit.
 --


maxIdle
2



 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --


maxWait
1






username
ioeadmin




password
ioeadmin






driverClassName
oracle.jdbc.driver.OracleDriver



 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed
the
 connection.  mysqld by default closes idle connections after 8
hours.
 --


url
jdbc:oracle:thin:@ipaddress:1521:MYDB






===
DatasourceFactory is a singleton class used to retrieve the datasource from
tomcat using JNDi..and connection is obtained from datasource...
public static DataSource getInstance() throws SystemException
{
if (!isDataSrcAvaliable)
{
if (dataSource == null)
{
new DataSourceFactory();
doLookUp();
isDataSrcAvaliable = true;
} //end if (dataSource == null)
}// end if (!isDataSrcAvaliable)
return dataSource;
} /* end getInstance() */

doLookUp method does this:
Context ctx = new InitialContext();
String dataSrc =
msgResource.getMessage(OEMAPIConstants.DATA_SOURCE_NAME);
Context env = (Context)ctx.lookup(java:comp/env);
dataSource = (DataSource) env.lookup(dataSrc);


public static Connection getConnection() throws