Replace transaction.setComplete() by database.commitTransaction()

This commit is contained in:
Torsten Grote
2016-10-31 08:47:11 -02:00
parent 36f087c512
commit b34b4623ed
39 changed files with 259 additions and 241 deletions

View File

@@ -180,7 +180,7 @@ class FeedManagerImpl implements FeedManager, Client, EventListener {
List<Feed> feeds = getFeeds(txn);
feeds.add(feed);
storeFeeds(txn, feeds);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -200,7 +200,7 @@ class FeedManagerImpl implements FeedManager, Client, EventListener {
feeds.remove(feed);
feeds.add(updatedFeed);
storeFeeds(txn, feeds);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -222,7 +222,7 @@ class FeedManagerImpl implements FeedManager, Client, EventListener {
}
if (!found) throw new DbException();
storeFeeds(txn, feeds);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -234,7 +234,7 @@ class FeedManagerImpl implements FeedManager, Client, EventListener {
Transaction txn = db.startTransaction(true);
try {
feeds = getFeeds(txn);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -405,7 +405,7 @@ class FeedManagerImpl implements FeedManager, Client, EventListener {
if (entryTime > lastEntryTime) lastEntryTime = entryTime;
}
}
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}