public function rollBackTransaction() {
        // check that a transaction is really active
        if (!$this->getConnection(false)->inTransaction())
            throw new \Exception("Not inside a DB transaction. Cannot commit.");

        try {
            $this->getConnection(false)->rollBack();
        } catch (Exception $_e) {
            throw new \Exception("Error while rolling back DB transaction: ".$pe->getMessage());
        }
    }