tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: OracleConnectionPoolDataSource
Date Mon, 23 Jul 2007 15:26:43 GMT
-----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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message