diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-07-19 11:50:19 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-07-19 11:50:19 +0200 |
commit | 71da4a9bc7e2ff79b2fb4cf8903d15fd75372859 (patch) | |
tree | a2a5841c65ebb4bda12d703378fc41b3cec69fb4 /id/server/moa-id-commons/src/main/java/at/gv | |
parent | 49acb697426d3c313ad047449ea62ac1bf3f4fd0 (diff) | |
download | moa-id-spss-71da4a9bc7e2ff79b2fb4cf8903d15fd75372859.tar.gz moa-id-spss-71da4a9bc7e2ff79b2fb4cf8903d15fd75372859.tar.bz2 moa-id-spss-71da4a9bc7e2ff79b2fb4cf8903d15fd75372859.zip |
SSO and Configuration updated
TODO:
--PVP2 from configuration
--UseIFrame for OAs
--SSO with mandates
--Resign IdentityLink
--Encrypted MOASession in Database
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at/gv')
2 files changed, 8 insertions, 8 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 index 8970a82aa..7a6efc5ac 100644 --- 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 @@ -27,7 +27,7 @@ public class ConfigurationDBRead { List result; EntityManager session = ConfigurationDBUtils.getCurrentSession(); - + javax.persistence.Query query = session.createQuery(QUERIES.get("getOnlineApplicationWithID")); //query.setParameter("id", id+"%"); query.setParameter("id", id); 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 index bc6a0b922..dc0e493d1 100644 --- 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 @@ -8,7 +8,7 @@ import javax.persistence.EntityTransaction; import javax.persistence.Persistence; import org.hibernate.HibernateException; -import org.hibernate.Session; + import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.logging.Logger; @@ -18,7 +18,7 @@ public final class ConfigurationDBUtils { private static EntityManagerFactory entitymanagerfactory; @SuppressWarnings("rawtypes") - private static final ThreadLocal THREAD_LOCAL = new ThreadLocal(); + private static final ThreadLocal THREAD_LOCAL_CONFIG = new ThreadLocal(); private static boolean automaticSessionHandling = false; protected ConfigurationDBUtils() { } @@ -69,7 +69,7 @@ public final class ConfigurationDBUtils { return entitymanagerfactory.createEntityManager(); } - EntityManager session = (EntityManager) THREAD_LOCAL.get(); + EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get(); // Open a new Session, if this Thread has none yet if (session == null) { session = getNewSession(); @@ -84,7 +84,7 @@ public final class ConfigurationDBUtils { //return sessionFactory.getCurrentSession(); return entitymanagerfactory.createEntityManager(); } - EntityManager session = (EntityManager) THREAD_LOCAL.get(); + EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get(); if (session != null) { Logger.warn("Previous session has not been closed; closing session now."); closeSession(); @@ -92,7 +92,7 @@ public final class ConfigurationDBUtils { Logger.debug("Opening new hibernate session..."); try { session = entitymanagerfactory.createEntityManager(); - THREAD_LOCAL.set(session); + THREAD_LOCAL_CONFIG.set(session); } catch (HibernateException hex) { Logger.error(hex.getMessage()); } @@ -113,8 +113,8 @@ public final class ConfigurationDBUtils { return; } Logger.debug("Closing current hibernate session..."); - Session session = (Session) THREAD_LOCAL.get(); - THREAD_LOCAL.set(null); + EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get(); + THREAD_LOCAL_CONFIG.set(null); if (session != null) { try { session.close(); |