File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes oracle connection pool setting and database cursors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "oracle connection pool setting and database cursors" Watch "oracle connection pool setting and database cursors" New topic

oracle connection pool setting and database cursors

Amit Da

Joined: Mar 07, 2003
Posts: 16
I am using Oracle's connection pool for managing connections. After using a ResultSet or executing a DML statement, I close the ResultSet, Statement and also finally the connection object(logical connection obtained from pool) to free the resources.
But it was noticed that in database there were several INACTIVE CURSORs and at some point they even reached the MAX number set in init file. Does anyone know how to resolve this ?
I tried settings -
on the connection cache object and that gets rid of the CURSORs faster but I am not sure what would be the reasonable values. The first two methods take a long. Is that in milis/s/minutes/hours ??? what's the unit ? Is anyone using these methods and knows what would be good settings for an enterprise app pool that has a lot of database interaction and several users(50+) hitting database at same time ?
Code snippet of pool usage:
OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource(); ocpds.setDriverType("thin");
OracleConnectionCacheImpl ocach = new OracleConnectionCacheImpl(ocpds);
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

I think it is because the physical connection is not closed.

I agree. Here's the link:
subject: oracle connection pool setting and database cursors
It's not a secret anymore!