DbSession session = dbClient.openSession(false);
try {
List<CharacteristicDto> allCharacteristicDtos = restoreCharacteristics(characteristicsXMLImporter.importXML(xml), updateDate, session);
restoreRules(allCharacteristicDtos, rules(languageKey, session), rulesXMLImporter.importXML(xml, validationMessages), validationMessages, updateDate, session);
session.commit();
} catch (IllegalArgumentException e) {
LOG.debug("Error when restoring the model", e);
validationMessages.addErrorText(e.getMessage());
} finally {
MyBatis.closeQuietly(session);