SQL Developer could not have been used to execute the Java code you posted so why are you checking open cursors for sql developer?
and program 'SQL Developer'
The query count rarely gets above 2. If I comment out the close statements
dataSource.setDriverType("oracle.jdbc.OracleDriver"); dataSource.setPassword("tiger"); dataSource.setUser("SCOTT"); dataSource.setURL(myUrl);
the query count will get as high as 60 or 70 but almost immediately drops down to 2-4 or so. That is because each loop iteration resuses the same result set and so the older result set gets garbage collected which results in it being closed.