sanity check: dont start transaction if thread was killed

This commit is contained in:
hns 2001-02-01 00:53:28 +00:00
parent e5bb6cd091
commit 0bd08fb9bd

View file

@ -106,9 +106,13 @@ public class Transactor extends Thread {
} }
public synchronized void begin (String tnm) throws Exception { public synchronized void begin (String tnm) throws Exception {
if (active) {
if (killed)
throw new DbException ("Transaction started on killed thread");
if (active)
abort (); abort ();
}
nodes.clear (); nodes.clear ();
cleannodes.clear (); cleannodes.clear ();
txn = nmgr.db.beginTransaction (); txn = nmgr.db.beginTransaction ();