Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Databse Cursor not getting closed

 
Kinnaree Patel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have closed resultset, callablestatement, session, connection everything


Can you post a typical example how you do that?

Herman
 
Kinnaree Patel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic