} catch (PersistenceException e) {
getLogger().debug("Failed to find mapping for user=" + user + " and domain=" + domain, e);
if (transaction.isActive()) {
transaction.rollback();
}
throw new RecipientRewriteTableException("Error while retrieve mappings", e);
} finally {
entityManager.close();
}
return null;
}