Use XDB::startTransaction() and XDB::commit().