Like I told him, Chris, I experienced very similar scenarios with my connection 
pooling, and had to alter and/or rewrite the classes, but I did get them 
closing properly. 
Some took some significant tweaking, but I finally got it.

Zdenek, if you could post the original code, maybe we could narrow it down for 
you.

If you'd like to just send me a few files individually, go right ahead. I'll 
try to take a look at it and be of help.

-----Original Message-----
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Monday, July 23, 2007 10:27 AM
To: Tomcat Users List
Subject: Re: OracleConnectionPoolDataSource


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Julio,

Julio J. Suárez Salinero wrote:
> Zdeněk Vráblík escribió:
>> Hi,
>>
>>> 4. I use OracleConnectionPoolDataSource because with
>>> javax.sql.DataSource it doesn't close correctly close connections from
>>> pool and server got to hang up.
>>
>> Have you got any exception?
>>
> It throwed "Closed Statement", "Exhausted Resultset" and
> "NullPointerException", but only when I do stress test. If I browse page
> with navigator it works correctly and throws no exceptions.

This suggests that the connections and statements are not being managed
properly. Are you sure you are using the pooled connections properly? If
you had told us what the exceptions you were getting earlier (always a
good idea to tell us HOW it's not working), I would have said that you
were leaking connections between requests.

"Closed Statement" usually means you're trying to read from a result set
that came from a statement that has been closed. Why are you trying to
read from a closed statement? I'm guessing your code doesn't do this:

PreparedStatement ps = conn.prepareStatement(...);
ResultSet rs = ps.executeQuery();

ps.close();
rs.next();

...because that would, of course, be stupid. The only explanation I can
think of is that somehow those connections and/or statements are being
accidentally shared by threads.

Let me ask another stupid question: if this was working before using
Tomcat's pooling, why are you killing yourself to use Oracle's pooled
connections when they don't appear to work properly?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGpMiz9CaO5/Lv0PARAnj6AJ40JQr2/pHY1JeavYSdFUStYpQlSwCfbTRJ
YG2H7taNbtcp+DtTGIr/vcs=
=knx7
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to