• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Open Cursors:New Issue

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all Ranchers
I m facing a very peculiar problem in my application

We take connection object fro the connection pool
Do the processings::
Open resultSet
Fire queries
But the resultset is kept open
AND WE HAVE RETURNED THE CONNECTION TO THE POOL
Now the problem is that it ius not possible for us to pit rs.close()
Secondly there are Cursors that are opened automatically with the resultset and as the resultset is not closed they remain open
And thus the cursor remain open and become dangling
So do we have a way to close the dangling cursor created by the system

Please reply fast its urgent
[ October 16, 2006: Message edited by: Bear Bibeault ]
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Odd... very... why can't you use rs.close()? Can you end transactions? Can you force connections to be closed?

Maybe if you gave us more information about your database server, web server, and why you have open cursors.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nishant Tiwari:
Now the problem is that it ius not possible for us to pit rs.close()


Why not? Can you show the code to illustrate why it is not possible. I'm having trouble visualizing any case where a finally block wouldn't work.
 
Bob Mathews
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See this is a production issue and the people who have developed it have not put that rs.close
Now if we start placing rs.close people are estimating it will take weeks to put it inplace and test it

I know situation and condition seemed awkward but please help it out

Just think of some alternative solution of closing the open cursor without rs.close


Thanks
It will be of great help
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aside from periodically restarting the application, its hard to make up for bad coding with a hack.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nishant,
As this is coding issue, it is hard to fix without a coding solution. I can't think of any way to "magically" close the cursors apart from restarting the application.

On a side note, it shouldn't take weeks for an emergency production fix. Maybe you can do a compare to show them only the rs.close() has changed?
reply
    Bookmark Topic Watch Topic
  • New Topic