boolean seenOpenResultSets = false;
/* For every activation */
for (int i = acts.size() - 1; i >= 0; i--) {
Activation a = (Activation) acts.elementAt(i);
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(a instanceof CursorActivation, "a is not a CursorActivation");
}
if (!a.isInUse())
{
continue;
}
if (!a.getResultSetHoldability())
{
continue;
}
ResultSet rs = ((CursorActivation) a).getResultSet();
/* is there an open result set? */
if ((rs != null) && !rs.isClosed() && rs.returnsRows())
{
seenOpenResultSets = true;
break;
}
}
if (!seenOpenResultSets)
return(true);
// There may be open ResultSet's that are yet to be garbage collected
// let's try and force these out rather than throw an error
System.gc();
System.runFinalization();
/* For every activation */
for (int i = acts.size() - 1; i >= 0; i--) {
Activation a = (Activation) acts.elementAt(i);
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(a instanceof CursorActivation, "a is not a CursorActivation");
}
if (!a.isInUse())
{
continue;
}
if (!a.getResultSetHoldability())
{
continue;
}
ResultSet rs = ((CursorActivation) a).getResultSet();