EntityManager entityManager = getServletEntityManager();
synchronized (entityManager) {
TypedQuery<ApplicationSettings> query = entityManager.createQuery("SELECT x FROM ApplicationSettings x", ApplicationSettings.class);
List<ApplicationSettings> resultList = query.getResultList();
if (resultList == null || resultList.isEmpty()) {
applicationSettings = new ApplicationSettings();
entityManager.getTransaction().begin();
try {
entityManager.persist(applicationSettings);
entityManager.getTransaction().commit();
} catch (RuntimeException e) {