aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-01-22 10:36:37 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-01-22 10:36:37 +0100
commit1b68d46f1508b60285c82f61bd60817b3c1baee4 (patch)
treea4623cc20b337ddae13bd3483f148e6a05fb7036 /id/server/moa-id-commons/src/main/java/at
parent112486af28e1bd7a82d7c64e396b7c58a152cf38 (diff)
downloadmoa-id-spss-1b68d46f1508b60285c82f61bd60817b3c1baee4.tar.gz
moa-id-spss-1b68d46f1508b60285c82f61bd60817b3c1baee4.tar.bz2
moa-id-spss-1b68d46f1508b60285c82f61bd60817b3c1baee4.zip
remove unused code
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java403
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java233
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java1
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java2
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java52
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java1
6 files changed, 0 insertions, 692 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
deleted file mode 100644
index 3836d5a1e..000000000
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
+++ /dev/null
@@ -1,403 +0,0 @@
-///*******************************************************************************
-// * Copyright 2014 Federal Chancellery Austria
-// * MOA-ID has been developed in a cooperation between BRZ, the Federal
-// * Chancellery Austria - ICT staff unit, and Graz University of Technology.
-// *
-// * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
-// * the European Commission - subsequent versions of the EUPL (the "Licence");
-// * You may not use this work except in compliance with the Licence.
-// * You may obtain a copy of the Licence at:
-// * http://www.osor.eu/eupl/
-// *
-// * Unless required by applicable law or agreed to in writing, software
-// * distributed under the Licence is distributed on an "AS IS" basis,
-// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// * See the Licence for the specific language governing permissions and
-// * limitations under the Licence.
-// *
-// * This product combines work with different licenses. See the "NOTICE" text
-// * file for details on the various modules and licenses.
-// * The "NOTICE" text file is part of the distribution. Any derivative works
-// * that you distribute must include a readable copy of the "NOTICE" text file.
-// *******************************************************************************/
-//package at.gv.egovernment.moa.id.commons.db;
-//
-//import java.util.ArrayList;
-//import java.util.HashMap;
-//import java.util.List;
-//import java.util.Map;
-//
-//import javax.persistence.EntityManager;
-//
-//import org.apache.commons.lang3.StringEscapeUtils;
-//
-//import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
-//import at.gv.egovernment.moa.logging.Logger;
-//import at.gv.egovernment.moa.util.MiscUtil;
-////import org.apache.commons.lang.StringEscapeUtils;
-//
-//import com.fasterxml.jackson.annotation.JsonProperty;
-//
-///**
-// *
-// * @author tlenz
-// *
-// * @deprecated
-// */
-//
-//@SuppressWarnings("rawtypes")
-//public class ConfigurationDBRead {
-//
-// private static Map<String, String> QUERIES = new HashMap<String, String>();
-//
-// static {
-// QUERIES.put("getActiveOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'");
-// QUERIES.put("getOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))");
-// QUERIES.put("getOnlineApplicationWithDBID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id");
-// QUERIES.put("getAllOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication");
-// QUERIES.put("getAllActiveOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '1'");
-// QUERIES.put("getAllNewOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '0' and onlineapplication.isAdminRequired = '1'");
-// QUERIES.put("getMOAIDConfiguration", "select moaidconfiguration from MOAIDConfiguration moaidconfiguration");
-// QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id");
-// QUERIES.put("getNewUserWithUserTokken", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken = :tokken");
-// QUERIES.put("getAllNewUsers", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '1'");
-// QUERIES.put("getAllOpenUsersRequests", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is not null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '0'");
-// QUERIES.put("getUserWithUserBPKWBPK", "select userdatabase from UserDatabase userdatabase where userdatabase.bpk = :bpk");
-// QUERIES.put("getUserWithUserUsername", "select userdatabase from UserDatabase userdatabase where userdatabase.username = :username");
-// QUERIES.put("getAllUsers", "select userdatabase from UserDatabase userdatabase");
-// QUERIES.put("getUsersWithOADBID", "select userdatabase from UserDatabase userdatabase inner join userdatabase.onlineApplication oa where oa.hjid = :id");
-// QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id");
-// }
-//
-//// public static OnlineApplication getActiveOnlineApplication(String id) {
-//// MiscUtil.assertNotNull(id, "OnlineApplictionID");
-//// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-////
-//// List result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getActiveOnlineApplicationWithID"));
-//// //query.setParameter("id", id+"%");
-//// query.setParameter("id", StringEscapeUtils.escapeHtml4(id));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.debug("No entries found.");
-//// return null;
-//// }
-////
-//// if (result.size() > 1) {
-//// Logger.warn("OAIdentifier match to more then one DB-entry!");
-//// return null;
-//// }
-////
-//// return (OnlineApplication) result.get(0);
-//// }
-////
-//// public static OnlineApplication getOnlineApplication(String id) {
-//// MiscUtil.assertNotNull(id, "OnlineApplictionID");
-//// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-////
-//// List result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getOnlineApplicationWithID"));
-//// //query.setParameter("id", id+"%");
-//// query.setParameter("id", id);
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-////
-//// if (result.size() > 1) {
-//// Logger.warn("OAIdentifier match to more then one DB-entry!");
-//// return null;
-//// }
-////
-//// return (OnlineApplication) result.get(0);
-//// }
-////
-//// public static OnlineApplication getOnlineApplication(long dbid) {
-//// MiscUtil.assertNotNull(dbid, "OnlineApplictionID");
-//// Logger.trace("Getting OnlineApplication with DBID " + dbid + " from database.");
-////
-//// List result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getOnlineApplicationWithDBID"));
-//// //query.setParameter("id", id+"%");
-//// query.setParameter("id", dbid);
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-////
-//// return (OnlineApplication) result.get(0);
-//// }
-////
-//// @JsonProperty("getMOAIDConfiguration")
-//// public static MOAIDConfiguration getMOAIDConfiguration() {
-//// Logger.trace("Load MOAID Configuration from database.");
-////
-//// List<MOAIDConfiguration> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getMOAIDConfiguration"));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found. Create fresh instance.");
-//// return null;
-//// }
-////
-//// return (MOAIDConfiguration) result.get(0);
-//// }
-////
-//// @JsonProperty("getAllOnlineApplications")
-//// public static List<OnlineApplication> getAllOnlineApplications() {
-//// Logger.trace("Get All OnlineApplications from database.");
-////
-//// List<OnlineApplication> result = null;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllOnlineApplications"));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return result;
-//// }
-////
-//// public static List<OnlineApplication> getAllNewOnlineApplications() {
-//// Logger.trace("Get All OnlineApplications from database.");
-////
-//// List<OnlineApplication> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllNewOnlineApplications"));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return result;
-//// }
-////
-//// @JsonProperty("getAllUsers")
-//// public static List<UserDatabase> getAllUsers() {
-//// Logger.trace("Get All OnlineApplications from database.");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllUsers"));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return result;
-//// }
-////
-//// public static List<OnlineApplication> getAllActiveOnlineApplications() {
-//// Logger.trace("Get All active OnlineApplications from database.");
-////
-//// List<OnlineApplication> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllActiveOnlineApplications"));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// result = new ArrayList<OnlineApplication>();
-////
-//// }
-//// return result;
-//// }
-////
-//// @SuppressWarnings("rawtypes")
-//// public static List<OnlineApplication> searchOnlineApplications(String id) {
-//// MiscUtil.assertNotNull(id, "OnlineApplictionID");
-//// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-////
-//// List<OnlineApplication> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("searchOnlineApplicationsWithID"));
-//// query.setParameter("id", "%" + id + "%");
-////
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-////
-//// return result;
-//// }
-////
-//// public static UserDatabase getUserWithID(long id) {
-//// MiscUtil.assertNotNull(id, "UserID");
-//// Logger.trace("Getting Userinformation with ID " + id + " from database.");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserID"));
-//// query.setParameter("id", id);
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return (UserDatabase) result.get(0);
-//// }
-////
-//// public static UserDatabase getUsersWithOADBID(long id) {
-//// MiscUtil.assertNotNull(id, "OADBID");
-//// Logger.trace("Getting Userinformation with OADBID " + id + " from database.");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUsersWithOADBID"));
-//// query.setParameter("id", id);
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return (UserDatabase) result.get(0);
-//// }
-////
-//// public static UserDatabase getUserWithUserName(String username) {
-//// MiscUtil.assertNotNull(username, "UserName");
-//// Logger.trace("Getting Userinformation with ID " + username + " from database.");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserUsername"));
-//// query.setParameter("username", username);
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return (UserDatabase) result.get(0);
-//// }
-////
-//// public static UserDatabase getUserWithUserBPKWBPK(String bpkwbpk) {
-//// MiscUtil.assertNotNull(bpkwbpk, "bpk/wbpk");
-//// Logger.trace("Getting Userinformation with ID " + bpkwbpk + " from database.");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserBPKWBPK"));
-//// query.setParameter("bpk", bpkwbpk);
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return (UserDatabase) result.get(0);
-//// }
-////
-//// public static UserDatabase getNewUserWithTokken(String tokken) {
-//// MiscUtil.assertNotNull(tokken, "bpk/wbpk");
-//// Logger.trace("Getting Userinformation with Tokken " + tokken + " from database.");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getNewUserWithUserTokken"));
-//// query.setParameter("tokken", tokken);
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return (UserDatabase) result.get(0);
-//// }
-////
-//// public static List<UserDatabase> getAllNewUsers() {
-//// Logger.trace("Get all new Users from Database");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllNewUsers"));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return result;
-//// }
-////
-//// public static List<UserDatabase> getAllOpenUsersRequests() {
-//// Logger.trace("Get all new Users from Database");
-////
-//// List<UserDatabase> result;
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-////
-//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllOpenUsersRequests"));
-//// result = query.getResultList();
-////
-//// Logger.trace("Found entries: " + result.size());
-////
-//// if (result.size() == 0) {
-//// Logger.trace("No entries found.");
-//// return null;
-//// }
-//// return result;
-//// }
-//}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
deleted file mode 100644
index 7f996cca7..000000000
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
+++ /dev/null
@@ -1,233 +0,0 @@
-///*******************************************************************************
-// * Copyright 2014 Federal Chancellery Austria
-// * MOA-ID has been developed in a cooperation between BRZ, the Federal
-// * Chancellery Austria - ICT staff unit, and Graz University of Technology.
-// *
-// * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
-// * the European Commission - subsequent versions of the EUPL (the "Licence");
-// * You may not use this work except in compliance with the Licence.
-// * You may obtain a copy of the Licence at:
-// * http://www.osor.eu/eupl/
-// *
-// * Unless required by applicable law or agreed to in writing, software
-// * distributed under the Licence is distributed on an "AS IS" basis,
-// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// * See the Licence for the specific language governing permissions and
-// * limitations under the Licence.
-// *
-// * This product combines work with different licenses. See the "NOTICE" text
-// * file for details on the various modules and licenses.
-// * The "NOTICE" text file is part of the distribution. Any derivative works
-// * that you distribute must include a readable copy of the "NOTICE" text file.
-// *******************************************************************************/
-//package at.gv.egovernment.moa.id.commons.db;
-//
-//import java.util.Properties;
-//
-//import javax.persistence.EntityManager;
-//import javax.persistence.EntityManagerFactory;
-//import javax.persistence.EntityTransaction;
-//import javax.persistence.Persistence;
-//
-//import org.hibernate.HibernateException;
-//
-//import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
-//import at.gv.egovernment.moa.logging.Logger;
-//
-//public final class ConfigurationDBUtils {
-//
-// private static EntityManagerFactory entitymanagerfactory;
-//
-// @SuppressWarnings("rawtypes")
-// private static final ThreadLocal THREAD_LOCAL_CONFIG = new ThreadLocal();
-// private static boolean automaticSessionHandling = false;
-//
-// protected ConfigurationDBUtils() { }
-//
-// public static void initHibernate(Properties props) throws MOADatabaseException {
-//
-//// try {
-////
-//// Logger.debug("Creating initial session factory...");
-////
-//// entitymanagerfactory =
-//// Persistence.createEntityManagerFactory("at.gv.egovernment.moa.id.commons.db.dao.config",
-//// props);
-////
-//// Logger.debug("Initial ConfigDB session factory successfully created.");
-////
-////
-//// } catch (Throwable ex) {
-//// Logger.error("Initial session factory creation failed: " + ex.getMessage());
-//// throw new MOADatabaseException("Initialization of Configuration Hibernate session factory failed.",ex);
-//// }
-// }
-//
-//
-//// /**
-//// * Checks if a session factory is currently available. If necessary a new
-//// * session factory is created.
-//// *
-//// * @return current (or new) session factory
-//// * @throws HibernateException
-//// * thrown if a hibernate error occurs
-//// */
-//// public static EntityManager getCurrentSession() {
-//// if (automaticSessionHandling) {
-////
-//// return entitymanagerfactory.createEntityManager();
-//// }
-////
-//// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
-////
-//// if (session != null && session.isOpen()) {
-////
-//// //maybe a hack, but sometimes we do not know if the session is closed (session already closed but isOpen()=true)
-//// try {
-//// javax.persistence.Query query = session.createQuery("select userdatabase from UserDatabase userdatabase");
-//// query.getResultList();
-////
-//// } catch (Throwable e) {
-//// Logger.warn("JPA Session Handling Warning!!!! - This error should not occur.");
-//// session = getNewSession();
-//// }
-////
-//// } else
-//// session = getNewSession();
-////
-//// return session;
-//// }
-////
-//// @SuppressWarnings("unchecked")
-//// public static EntityManager getNewSession() {
-//// if (automaticSessionHandling) {
-//// Logger.warn("Session is being automatically handled by hibernate. Therefore this session maybe not being newly created. Use HibernateUtil.getCurrentSession() instead.");
-//// return entitymanagerfactory.createEntityManager();
-//// }
-//// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
-//// if (session != null ) {
-//// Logger.warn("Previous session has not been closed; closing ConfigDB session now.");
-//// closeSession();
-//// }
-//// Logger.debug("Opening new ConfigDB hibernate session...");
-//// try {
-//// session = entitymanagerfactory.createEntityManager();
-//// THREAD_LOCAL_CONFIG.set(session);
-//// } catch (HibernateException hex) {
-//// Logger.error(hex.getMessage());
-//// }
-//// return session;
-//// }
-//
-// /**
-// * Closes the current session.
-// *
-// * @throws HibernateException
-// * thrown if session is already closed or a hibernate error
-// * occurs.
-// *
-// * @deprecated
-// */
-//@SuppressWarnings("unchecked")
-//public static void closeSession() {
-//
-//}
-//
-//// /**
-//// * Closes the current session.
-//// *
-//// * @throws HibernateException
-//// * thrown if session is already closed or a hibernate error
-//// * occurs.
-//// */
-//// @SuppressWarnings("unchecked")
-//// public static void closeSession() {
-//// if (automaticSessionHandling) {
-//// Logger.warn("Session is being automatically handled by hibernate. Therefore the current session cannot be closed on demand.");
-//// return;
-//// }
-//// Logger.debug("Closing current ConfigDB hibernate session...");
-//// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
-//// THREAD_LOCAL_CONFIG.set(null);
-//// if (session != null) {
-//// try {
-//// session.close();
-////
-//// } catch (HibernateException hex) {
-//// Logger.error(hex.getMessage());
-//// }
-//// }
-//// }
-////
-//// public static boolean save(Object dbo) throws MOADatabaseException {
-//// EntityTransaction tx = null;
-////
-//// try {
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//// tx = session.getTransaction();
-////
-//// synchronized (session) {
-//// tx.begin();
-//// session.merge(dbo);
-//// tx.commit();
-////
-//// session.clear();
-//// }
-//// return true;
-////
-//// } catch(HibernateException e) {
-//// Logger.warn("Error during Config database saveOrUpdate. Rollback.", e);
-//// tx.rollback();
-//// throw new MOADatabaseException(e);
-//// }
-//// }
-////
-////
-//// public static boolean saveOrUpdate(Object dbo) throws MOADatabaseException {
-//// EntityTransaction tx = null;
-////
-//// try {
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//// tx = session.getTransaction();
-////
-//// synchronized (session) {
-//// tx.begin();
-////
-//// session.merge(dbo);
-//// session.flush();
-////
-//// tx.commit();
-////
-//// //session.clear();
-//// }
-//// return true;
-////
-//// } catch(HibernateException e) {
-//// Logger.warn("Error during Config database saveOrUpdate. Rollback.", e);
-//// tx.rollback();
-//// throw new MOADatabaseException(e);
-//// }
-//// }
-////
-//// public static boolean delete(Object dbo) {
-//// EntityTransaction tx = null;
-//// try {
-//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//// tx = session.getTransaction();
-////
-//// synchronized (session) {
-//// tx.begin();
-//// session.remove(session.contains(dbo) ? dbo : session.merge(dbo));
-//// tx.commit();
-//// }
-////
-//// return true;
-////
-//// } catch(HibernateException e) {
-//// Logger.warn("Error during Config database delete. Rollback.", e);
-//// tx.rollback();
-//// return false;
-//// }
-//// }
-//
-//}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java
index 49e0634cb..ecb13ef34 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java
@@ -32,7 +32,6 @@ import org.hibernate.Transaction;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
-import org.hibernate.service.ServiceRegistryBuilder;
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.logging.Logger;
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java
index c049eebc4..28c705c71 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java
@@ -12,8 +12,6 @@ import at.gv.egovernment.moa.id.commons.config.ConfigurationMigrationUtils;
import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
import at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfiguration;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineApplication;
-
-import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
import at.gv.egovernment.moa.id.commons.utils.KeyValueUtils;
import at.gv.egovernment.moa.logging.Logger;
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java
deleted file mode 100644
index ccc7f33f1..000000000
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java
+++ /dev/null
@@ -1,52 +0,0 @@
-//package at.gv.egovernment.moa.id.commons.db;
-//
-//import java.util.Date;
-//import java.util.List;
-//
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Component;
-//
-//import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
-//import at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfiguration;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentGeneral;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.ChainingModes;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.DefaultBKUs;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.GenericConfiguration;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineApplication;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.SLRequestTemplates;
-//import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
-//import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
-//
-///**
-// * This class is used for writing to the key-value database.
-// */
-//@Component
-//public class NewConfigurationDBWrite {
-//
-// private static MOAIDConfiguration conf;
-//
-// @Autowired(required = true)
-// public void setConfiguration(MOAIDConfiguration conf) {
-// // https://jira.spring.io/browse/SPR-3845
-// NewConfigurationDBWrite.conf = conf;
-// }
-//
-//
-//
-// /**
-// * @param user
-// */
-// public void saveOrUpdate(UserDatabase user) throws MOADatabaseException{
-// // TODO Auto-generated method stub
-//
-// }
-//
-// /**
-// * @param dbuser
-// */
-// public void delete(UserDatabase dbuser) {
-// // TODO Auto-generated method stub
-//
-// }
-//
-//}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java
index eac47f93f..7e031cc76 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java
@@ -32,7 +32,6 @@ import org.hibernate.Transaction;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
-import org.hibernate.service.ServiceRegistryBuilder;
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.logging.Logger;