Added try/catch statements to all calls of close() methods in
statement and tableset classes. This seems to be necessary when using Sybase, as reported by Georg Backer <gbacker@lionhead.com> on the list.
This commit is contained in:
parent
1ef841f9c0
commit
fed45aa542
1 changed files with 20 additions and 19 deletions
|
@ -425,9 +425,9 @@ public final class NodeManager {
|
||||||
rec.markForInsert ();
|
rec.markForInsert ();
|
||||||
tds.save ();
|
tds.save ();
|
||||||
} finally {
|
} finally {
|
||||||
if (tds != null) {
|
if (tds != null) try {
|
||||||
tds.close ();
|
tds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
dbm.notifyDataChange ();
|
dbm.notifyDataChange ();
|
||||||
}
|
}
|
||||||
|
@ -519,9 +519,9 @@ public final class NodeManager {
|
||||||
tds.save ();
|
tds.save ();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (tds != null) {
|
if (tds != null) try {
|
||||||
tds.close ();
|
tds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
dbm.notifyDataChange ();
|
dbm.notifyDataChange ();
|
||||||
}
|
}
|
||||||
|
@ -553,8 +553,9 @@ public final class NodeManager {
|
||||||
st = con.createStatement ();
|
st = con.createStatement ();
|
||||||
st.executeUpdate ("DELETE FROM "+dbm.getTableName ()+" WHERE "+dbm.getIDField ()+" = "+node.getID ());
|
st.executeUpdate ("DELETE FROM "+dbm.getTableName ()+" WHERE "+dbm.getIDField ()+" = "+node.getID ());
|
||||||
} finally {
|
} finally {
|
||||||
if (st != null)
|
if (st != null) try {
|
||||||
st.close ();
|
st.close ();
|
||||||
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
dbm.notifyDataChange ();
|
dbm.notifyDataChange ();
|
||||||
}
|
}
|
||||||
|
@ -589,9 +590,9 @@ public final class NodeManager {
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// tx.timer.endEvent ("generateID "+map);
|
// tx.timer.endEvent ("generateID "+map);
|
||||||
if (qds != null) {
|
if (qds != null) try {
|
||||||
qds.close ();
|
qds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -615,9 +616,9 @@ public final class NodeManager {
|
||||||
retval = qds.getRecord (0).getValue (1).asString ();
|
retval = qds.getRecord (0).getValue (1).asString ();
|
||||||
} finally {
|
} finally {
|
||||||
// tx.timer.endEvent ("generateID "+map);
|
// tx.timer.endEvent ("generateID "+map);
|
||||||
if (qds != null) {
|
if (qds != null) try {
|
||||||
qds.close ();
|
qds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -754,9 +755,9 @@ public final class NodeManager {
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
// tx.timer.endEvent ("getNodes "+home);
|
// tx.timer.endEvent ("getNodes "+home);
|
||||||
if (tds != null) {
|
if (tds != null) try {
|
||||||
tds.close ();
|
tds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -805,9 +806,9 @@ public final class NodeManager {
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
// tx.timer.endEvent ("countNodes "+home);
|
// tx.timer.endEvent ("countNodes "+home);
|
||||||
if (qds != null) {
|
if (qds != null) try {
|
||||||
qds.close ();
|
qds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
return rel.maxSize > 0 ? Math.min (rel.maxSize, retval) : retval;
|
return rel.maxSize > 0 ? Math.min (rel.maxSize, retval) : retval;
|
||||||
}
|
}
|
||||||
|
@ -851,9 +852,9 @@ public final class NodeManager {
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
// tx.timer.endEvent ("getNodeIDs "+home);
|
// tx.timer.endEvent ("getNodeIDs "+home);
|
||||||
if (qds != null) {
|
if (qds != null) try {
|
||||||
qds.close ();
|
qds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -896,9 +897,9 @@ public final class NodeManager {
|
||||||
node = new Node (dbm, rec, safe);
|
node = new Node (dbm, rec, safe);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (tds != null) {
|
if (tds != null) try {
|
||||||
tds.close ();
|
tds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
|
@ -973,9 +974,9 @@ public final class NodeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (tds != null) {
|
if (tds != null) try {
|
||||||
tds.close ();
|
tds.close ();
|
||||||
}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
|
|
Loading…
Add table
Reference in a new issue