ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilAtomQueryTransaction.php
Go to the documentation of this file.
1<?php
2
11{
12
18 public function run()
19 {
20 $this->checkBeforeRun();
21 $this->runWithTransactions();
22 }
23
24
28 protected function runWithTransactions()
29 {
30 $i = 0;
31 do {
32 $e = null;
33 try {
34 $this->ilDBInstance->beginTransaction();
35 $this->runQueries();
36 $this->ilDBInstance->commit();
37 } catch (ilDatabaseException $e) {
38 $this->ilDBInstance->rollback();
39 if ($i >= self::ITERATIONS - 1) {
40 throw $e;
41 }
42 }
43 $i++;
44 } while ($e instanceof ilDatabaseException);
45 }
46}
An exception for terminatinating execution or to throw for unit testing.
Class ilAtomQuery.
Class ilAtomQueryTransaction.
Class ilDatabaseException.
Interface ilAtomQuery.
$i
Definition: metadata.php:24