Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can this code cause a connection leak? Row r = viewObject.first();

PamelaSep 2 2022

JDeveloper Version 11.1.2.4.0.
Often in my application instead of using the following code:
ViewObject vo = am.getMonthlyWeeklyDhrSumView1();
vo.executeQuery();
RowSetIterator rsIterator = vo.createRowSetIterator(null);
rsIterator.reset();
Row row = rsIterator.first(); //use the first row after that...
rsIterator.closeRowSetIterator();
I am using the following code to get the first row of a view object:
ViewObject vo = am.getMonthlyWeeklyDhrSumView1();
Row row = vo.first();
and not closing anything.
Is it possible that this is causing a connection leak?
It worked well for many years until recently I am starting to get an issue and I see a lot of inactive sessions with this view object that is executing on every row selection of a specific table...

Comments

Processing

Post Details

Added on Sep 2 2022
2 comments
62 views