Hibernate version: 3.1.3
JBOSS version: 4.0.4
Oracle version: 10g
I have read on hibernate site the article "
After a while, Oracle throws this exception: too many open cursors". It simply says "The Oracle JDBC driver doesn't much like to have its prepared statements cached. Disable PreparedStatement caching for the connection pool."
Could somebody explain why should I disable PreparedStatement caching for the connection pool in order to avoid the "too many open cursors" Oracle error?
Disabling PreparedStatement caching would result in a drop of performance as far as I know. Before using Hibernate I used for years straight JDBC (without Hibernate) and I never got "too many open cursors" from Oracle, of course having the PreparedStatement cached by the Oracle driver. Now, with Hibernate I get a lot of this "too many open cursors" and so far the only solution I found is to increase the number of cursors in Oracle, but this is not scalable: during a single JTA transaction with heavily database deletes and inserts it needs hundreds of connections, when it could just use only one.
Thank you,
Bucegi Omu