It might be a good time for a bartender to move this topic to the JDBC forum so you can get a wider range of expertise.
It is accurate that closing a Statement will also close the ResultSet.
If you find that properly closing your ResultSet a/o Statement and connections as you finish with them leads you to still continually hit the cursor maximum for your database you can
reexamine your code to find places where you can do more of your work with fewer cursors. Try using batch updates, etc.
work with your DBA to determine if increasing the cursor maximum is possible
I'd highly recommend focusing as much effort as possible on the first, as it will force you to design the JDBC layer in the most efficient way possible. [ May 30, 2008: Message edited by: Stevi Deter ]
There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
but in order to change the code, i will be needed the permission and i know the first thing that my boss will say me, there is no need to close the result set , as it will be closed automatically.
also, i don't know who did that coding, no try-catch has been used, every method is throwing an exception, after executing the prepared Statement, they have closed the prepared statement. Ideally we should use close method inside finally.
What is the good excuse or reason, I can tell to my boss so that he let me to change the code ?