File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Databse Cursor not getting closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Databse Cursor not getting closed" Watch "Databse Cursor not getting closed" New topic
Author

Databse Cursor not getting closed

Kinnaree Patel
Ranch Hand

Joined: Oct 30, 2007
Posts: 33
Hi Ranchers,

I have developed an application that uses Dynamic SQL. Problem is that huge number of cursors get open when the application is run. I have closed resultset, callablestatement, session, connection everything. But still the cursors does not get closed because of which the server stops responding after sometime. Is the the problem related to dynamic SQL or I am missing something from Java??? We are using Oracle 10g as backend and on front end side we have JSP, struts. The functions and procedures I call return reference cursors.

I would be greatly thankful if somebody can put atleast some light on this problem. I don't know whether it is a foolish question. But I am totally stuck. We are using 2 layered architecture at back-end. Can that be a cause for so many cursors to open??

Please Help!!!
[ April 14, 2008: Message edited by: Kinnaree Patel ]

95% people read history, 5% create it... On The Way To 5%...
SCJP 5.0 -> 88%, SCWCD -> 86%, Next -> SCBCD and SCDJWS
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi,

I have closed resultset, callablestatement, session, connection everything


Can you post a typical example how you do that?

Herman
Kinnaree Patel
Ranch Hand

Joined: Oct 30, 2007
Posts: 33
Hi Herman,

I used resultset.close() in finally block. But anyways, got the solution. I need to used Datasource. I used it and the problem is solved.

Thanks.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Databse Cursor not getting closed