10GR2 vs. 10GR1 Java Open Cursor Differences

  • From: "MacGregor, Ian A." <ian@xxxxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 10 Jan 2007 15:14:25 -0800

Since Moving to 10,2 some open cursor problems have surfaced.  Here's an 
example of the code:

        // collect the ProcessInstances in this Stream's ParentStream that depe
nd (status transition) on ProcessInstances within this Stream:

         stmt = connection.prepareStatement("select PI.ProcessInstance from Proc
essInstance PI, Process P, ProcessStatusCondition PSC where PI.Stream = ? and PI
.Process = P.Process and P.Process = PSC.DependentProcess and PSC.Process in (se
lect Process from Process where Task = ?) and PI.IsLatest = 1");

         stmt.setInt(1, parentStream);
         stmt.setInt(2, task);
         rs = stmt.executeQuery();
         while (rs.next())
            processInstanceSet.add(new Integer(rs.getInt("PROCESSINSTANCE")));
         stmt.close();


I'm not a Java person.  I did noticeThe code has no rs.close()  statement.  The 
developer admits that he doesn't explicitly close the results set.  The trouble 
is that he swears it all worked in 10GR1 and the users testing the system back 
him up.

The code is indirectly recursive;   A calls B which calls A and may nest 
several times.

Ian MacGregor
Stanford Linear Accelerator Center
ian@xxxxxxxxxxxxxxxxx


I 
--
//www.freelists.org/webpage/oracle-l


Other related posts: