aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/moa-id-commons')
-rw-r--r--id/server/moa-id-commons/.classpath38
-rw-r--r--id/server/moa-id-commons/.project37
-rw-r--r--id/server/moa-id-commons/pom.xml183
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java238
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java214
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java170
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java92
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java187
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java87
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java69
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java22
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/bindings.xjb10
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/hibernate.cfg.xml14
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd951
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/persistence_template.xml17
15 files changed, 2329 insertions, 0 deletions
diff --git a/id/server/moa-id-commons/.classpath b/id/server/moa-id-commons/.classpath
new file mode 100644
index 000000000..88431cf04
--- /dev/null
+++ b/id/server/moa-id-commons/.classpath
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="target/generated-sources/xjc"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ <attribute name="org.eclipse.jst.component.nondependency" value=""/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/server/moa-id-commons/.project b/id/server/moa-id-commons/.project
new file mode 100644
index 000000000..75c3e013e
--- /dev/null
+++ b/id/server/moa-id-commons/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-id-commons</name>
+ <comment></comment>
+ <projects>
+ <project>moa-common</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml
new file mode 100644
index 000000000..f04de3ad8
--- /dev/null
+++ b/id/server/moa-id-commons/pom.xml
@@ -0,0 +1,183 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>MOA.id</groupId>
+ <artifactId>moa-id</artifactId>
+ <version>1.5.2</version>
+ </parent>
+ <artifactId>moa-id-commons</artifactId>
+ <name>moa-id-commons</name>
+ <groupId>MOA.id.server</groupId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>4.2.1.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-c3p0</artifactId>
+ <version>4.2.1.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>4.2.1.Final</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <type>jar</type>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-xjc</artifactId>
+ <version>2.2.7</version>
+ </dependency -->
+
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <version>1.0.1.Final</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jvnet.hyperjaxb3</groupId>
+ <artifactId>hyperjaxb3-ejb-runtime</artifactId>
+ <version>0.5.6</version>
+ </dependency>
+
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.25</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources/config</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>target/generated-sources/xjc</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <archive>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.jvnet.hyperjaxb3</groupId>
+ <artifactId>maven-hyperjaxb3-plugin</artifactId>
+ <version>0.5.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <extension>true</extension>
+ <schemaDirectory>src/main/resources/config</schemaDirectory>
+ <bindingDirectory>src/main/resources/config</bindingDirectory>
+ <persistenceXml>src/main/resources/config/persistence_template.xml</persistenceXml>
+ <generatePackage>at.gv.egovernment.moa.id.commons.db.dao.config</generatePackage>
+ </configuration>
+ </plugin>
+ <plugin>
+ <inherited>true</inherited>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <charset>UTF-8</charset>
+ <docencoding>UTF-8</docencoding>
+ <quiet>true</quiet>
+ <author>false</author>
+ <version>false</version>
+ <use>true</use>
+ <excludePackageNames>at.gv.egovernment.moa.spss.server.*;at.gv.egovernment.moa.spss.api.impl.*;at.gv.egovernment.moa.spss.impl.*</excludePackageNames>
+ <tags>
+ <tag>
+ <name>pre</name>
+ <placement>a</placement>
+ <head>Preconditions:</head>
+ </tag>
+ <tag>
+ <name>post</name>
+ <placement>a</placement>
+ <head>Postconditions:</head>
+ </tag>
+ </tags>
+ <links>
+ <link>http://java.sun.com/j2se/1.4/docs/api/</link>
+ <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
+ <link>http://logging.apache.org/log4j/docs/api/</link>
+ </links>
+ <target>1.5</target>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-javadoc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <version>1.5.2</version>
+</project> \ No newline at end of file
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
new file mode 100644
index 000000000..795981777
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
@@ -0,0 +1,238 @@
+package at.gv.egovernment.moa.id.commons.db;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+
+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;
+
+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 like SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'");
+ QUERIES.put("getOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix like 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("getMOAIDConfiguration", "select moaidconfiguration from MOAIDConfiguration moaidconfiguration");
+ QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id");
+ QUERIES.put("getUserWithUserUsername", "select userdatabase from UserDatabase userdatabase where userdatabase.username = :username");
+ QUERIES.put("getAllUsers", "select userdatabase from UserDatabase userdatabase");
+ QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id"); }
+
+ @SuppressWarnings("rawtypes")
+ 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", id);
+ 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);
+ }
+
+
+ @SuppressWarnings("rawtypes")
+ 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;
+ }
+
+ return (OnlineApplication) result.get(0);
+ }
+
+ @SuppressWarnings("rawtypes")
+ 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);
+ }
+
+ public static MOAIDConfiguration getMOAIDConfiguration() {
+ Logger.trace("Load MOAID Configuration from database.");
+
+ List 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.");
+ return null;
+ }
+
+ return (MOAIDConfiguration) result.get(0);
+ }
+
+ public static List<OnlineApplication> getAllOnlineApplications() {
+ Logger.trace("Get All OnlineApplications from database.");
+
+ List<OnlineApplication> result;
+ 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<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.");
+ return null;
+ }
+ 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 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);
+ }
+}
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
new file mode 100644
index 000000000..16cea07d8
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
@@ -0,0 +1,214 @@
+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 org.hibernate.Session;
+
+
+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 {
+
+ //add Hibernate annotations
+// Configuration hibernateConfig = new Configuration();
+// hibernateConfig.addAnnotatedClass(AssertionStore.class);
+// hibernateConfig.addAnnotatedClass(AuthenticatedSessionStore.class);
+// hibernateConfig.addAnnotatedClass(OASessionStore.class);
+// hibernateConfig.addAnnotatedClass(OldSSOSessionIDStore.class);
+// hibernateConfig.addProperties(props);
+
+
+ Logger.debug("Creating initial session factory...");
+// entitymanagerfactory =
+// Persistence.createEntityManagerFactory("at.gv.egovernment.moa.id.commons.db.dao.config",
+// hibernateConfig.getProperties());
+
+ 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 sessionFactory.getCurrentSession();
+ 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.
+ */
+ @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.persist(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();
+
+ //session.clear();
+ }
+
+ 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
new file mode 100644
index 000000000..5e4ec0f13
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java
@@ -0,0 +1,170 @@
+package at.gv.egovernment.moa.id.commons.db;
+
+import java.util.Properties;
+
+import org.apache.commons.lang3.StringUtils;
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.service.ServiceRegistry;
+import org.hibernate.service.ServiceRegistryBuilder;
+
+import at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore;
+import at.gv.egovernment.moa.id.commons.db.dao.session.AuthenticatedSessionStore;
+import at.gv.egovernment.moa.id.commons.db.dao.session.OASessionStore;
+import at.gv.egovernment.moa.id.commons.db.dao.session.OldSSOSessionIDStore;
+import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
+import at.gv.egovernment.moa.logging.Logger;
+
+public final class MOASessionDBUtils {
+
+ private static SessionFactory sessionFactory;
+ private static ServiceRegistry serviceRegistry;
+
+ @SuppressWarnings("rawtypes")
+ private static final ThreadLocal THREAD_LOCAL = new ThreadLocal();
+ private static boolean automaticSessionHandling = false;
+
+ private static final String[] AUTOMATIC_SESSION_HANDLING_VALUES = new String[] { "jta", "thread" };
+ private static final String SESSION_HANDLING_KEY = "hibernate.current_session_context_class";
+
+ private static Configuration configuration;
+
+ protected MOASessionDBUtils() { }
+
+ public static void initHibernate(Configuration config, Properties hibernateProperties) {
+
+ String scm = StringUtils.trimToNull(hibernateProperties.getProperty(SESSION_HANDLING_KEY));
+ if (scm != null) {
+ automaticSessionHandling = scm.indexOf(AUTOMATIC_SESSION_HANDLING_VALUES[0]) != -1 || scm.indexOf(AUTOMATIC_SESSION_HANDLING_VALUES[1]) != -1;
+ }
+ Logger.debug("Evaluating hibernate property \"" + SESSION_HANDLING_KEY + "\".");
+ if (automaticSessionHandling) {
+ Logger.info("Hibernate is automatically handling session context management.");
+ } else {
+ Logger.info("Hibernate is NOT automatically handling session context management. Using build-in ThreadLocal session handling.");
+ }
+ try {
+ //Create the SessionFactory
+ Logger.debug("Creating initial MOASession session factory...");
+
+ config.configure();
+ serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry();
+ sessionFactory = config.buildSessionFactory(serviceRegistry);
+ Logger.debug("Initial MOASession session factory successfully created.");
+
+ } catch (Throwable ex) {
+ Logger.error("Initial MOASession session factory creation failed: " + ex.getMessage());
+ throw new ExceptionInInitializerError(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 Session getCurrentSession() {
+ if (automaticSessionHandling) {
+ return sessionFactory.getCurrentSession();
+ }
+ Session session = (Session) THREAD_LOCAL.get();
+ // Open a new Session, if this Thread has none yet
+ if (session == null || !session.isConnected()) {
+ session = getNewSession();
+ }
+ return session;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Session 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 sessionFactory.getCurrentSession();
+ }
+ Session session = (Session) THREAD_LOCAL.get();
+ if (session != null) {
+ Logger.warn("Previous MOASession session has not been closed; closing session now.");
+ closeSession();
+ }
+ Logger.debug("Opening new MOASession hibernate session...");
+ try {
+ session = sessionFactory.openSession();
+ THREAD_LOCAL.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.
+ */
+ @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 MOASession hibernate session...");
+ Session session = (Session) THREAD_LOCAL.get();
+ THREAD_LOCAL.set(null);
+ if (session != null) {
+ try {
+ session.close();
+
+ } catch (HibernateException hex) {
+ Logger.error(hex.getMessage());
+ }
+ }
+ }
+
+ public static boolean saveOrUpdate(Object dbo) throws MOADatabaseException {
+ Transaction tx = null;
+ try {
+ Session session = MOASessionDBUtils.getCurrentSession();
+
+ synchronized (session) {
+ tx = session.beginTransaction();
+ session.saveOrUpdate(dbo);
+ tx.commit();
+ }
+ return true;
+
+ } catch(HibernateException e) {
+ Logger.warn("Error during MOASession database saveOrUpdate. Rollback.", e);
+ tx.rollback();
+ throw new MOADatabaseException(e);
+ }
+ }
+
+ public static boolean delete(Object dbo) {
+ Transaction tx = null;
+ try {
+ Session session = MOASessionDBUtils.getCurrentSession();
+
+ synchronized (session) {
+ tx = session.beginTransaction();
+ session.delete(dbo);
+ tx.commit();
+ }
+
+ return true;
+
+ } catch(HibernateException e) {
+ Logger.warn("Error during MOASession 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/dao/session/AssertionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java
new file mode 100644
index 000000000..50c156c4e
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java
@@ -0,0 +1,92 @@
+package at.gv.egovernment.moa.id.commons.db.dao.session;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Lob;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.DynamicUpdate;
+
+
+
+@Entity
+@DynamicUpdate(value=true)
+@Table(name = "assertionstore")
+@NamedQueries({
+ @NamedQuery(name="getAssertionWithArtifact", query = "select assertionstore from AssertionStore assertionstore where assertionstore.artifact = :artifact"),
+ @NamedQuery(name="getAssertionWithTimeOut", query = "select assertionstore from AssertionStore assertionstore where assertionstore.timestamp < :timeout")
+})
+
+public class AssertionStore implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "id", unique=true, nullable=false)
+ private long id;
+
+ @Column(name = "artifact", unique=true, nullable=false)
+ private String artifact;
+
+ @Column(name = "type", nullable=false)
+ private String type;
+
+ @Column(name = "assertion", nullable=false)
+ @Lob private byte [] assertion;
+
+ @Column(name = "timestamp", nullable=false)
+ Date timestamp;
+
+
+
+ public String getArtifact() {
+ return artifact;
+ }
+
+ public void setArtifact(String artifact) {
+ this.artifact = artifact;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public byte[] getAssertion() {
+ return assertion;
+ }
+
+ public void setAssertion(byte[] assertion) {
+ this.assertion = assertion;
+ }
+
+ public Date getDatatime() {
+ return timestamp;
+ }
+
+ public void setDatatime(Date datatime) {
+ this.timestamp = datatime;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+
+}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java
new file mode 100644
index 000000000..ed865d70f
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java
@@ -0,0 +1,187 @@
+package at.gv.egovernment.moa.id.commons.db.dao.session;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Lob;
+import javax.persistence.OneToMany;
+import javax.persistence.PrePersist;
+import javax.persistence.PreUpdate;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+
+import org.hibernate.annotations.DynamicUpdate;
+
+
+@Entity
+@DynamicUpdate(value=true)
+@Table(name = "authenticatedsessionstore")
+@NamedQueries({
+ @NamedQuery(name="getSessionWithID", query = "select authenticatedsessionstore from AuthenticatedSessionStore authenticatedsessionstore where authenticatedsessionstore.sessionid = :sessionid"),
+ @NamedQuery(name="getSessionWithSSOID", query = "select authenticatedsessionstore from AuthenticatedSessionStore authenticatedsessionstore where authenticatedsessionstore.SSOsessionid = :sessionid"),
+ @NamedQuery(name="getSessionWithPendingRequestID", query = "select authenticatedsessionstore from AuthenticatedSessionStore authenticatedsessionstore where authenticatedsessionstore.pendingRequestID = :sessionid"),
+ @NamedQuery(name="getMOAISessionsWithTimeOut", query = "select authenticatedsessionstore from AuthenticatedSessionStore authenticatedsessionstore where authenticatedsessionstore.created < :timeoutcreate or authenticatedsessionstore.updated < :timeoutupdate")
+})
+
+public class AuthenticatedSessionStore implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ @Column(name = "id", unique=true, nullable=false)
+ private long id;
+
+ @Column(name = "sessionid", unique=true, nullable=false)
+ private String sessionid;
+
+ @Column(name = "SSOsessionid")
+ private String SSOsessionid;
+
+ @Column(name = "session", nullable=false)
+ @Lob private byte [] session;
+
+ @Column(name = "isAuthenticated", nullable=false)
+ private boolean isAuthenticated = false;
+
+ @Column(name = "isSSOSession", nullable=false)
+ private boolean isSSOSession = false;
+
+ @Column(name = "pendingRequestID", nullable=false)
+ private String pendingRequestID = "";
+
+ @Column(name = "created", updatable=false, nullable=false)
+ @Temporal(TemporalType.TIMESTAMP)
+ private Date created;
+
+ @Column(name = "updated")
+ @Temporal(TemporalType.TIMESTAMP)
+ private Date updated;
+
+ @OneToMany(mappedBy="moasession", cascade=CascadeType.ALL)
+ private List<OASessionStore> activeOAsessions = null;
+
+ @OneToMany(mappedBy="moasession", cascade=CascadeType.ALL)
+ private List<OldSSOSessionIDStore> oldssosessionids = null;
+
+ @PrePersist
+ protected void created() {
+ this.updated = this.created = new Date();
+ }
+
+ @PreUpdate
+ protected void lastUpdate() {
+ this.updated = new Date();
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getSessionid() {
+ return sessionid;
+ }
+
+ public void setSessionid(String sessionid) {
+ this.sessionid = sessionid;
+ }
+
+ public String getSSOsessionid() {
+ return SSOsessionid;
+ }
+
+ public void setSSOsessionid(String sSOsessionid) {
+ SSOsessionid = sSOsessionid;
+ }
+
+ public byte[] getSession() {
+ return session;
+ }
+
+ public void setSession(byte[] session) {
+ this.session = session;
+ }
+
+ public boolean isAuthenticated() {
+ return isAuthenticated;
+ }
+
+ public void setAuthenticated(boolean isAuthenticated) {
+ this.isAuthenticated = isAuthenticated;
+ }
+
+ public boolean isSSOSession() {
+ return isSSOSession;
+ }
+
+ public void setSSOSession(boolean isSSOSession) {
+ this.isSSOSession = isSSOSession;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+ public Date getUpdated() {
+ return updated;
+ }
+
+ public void setUpdated(Date updated) {
+ this.updated = updated;
+ }
+
+ public List<OASessionStore> getActiveOAsessions() {
+ return activeOAsessions;
+ }
+
+ public void setActiveOAsessions(List<OASessionStore> activeOAsessions) {
+ if (activeOAsessions == null) {
+ this.activeOAsessions = new ArrayList<OASessionStore>();
+ }
+
+ this.activeOAsessions = activeOAsessions;
+ }
+
+ public List<OldSSOSessionIDStore> getOldssosessionids() {
+ return oldssosessionids;
+ }
+
+ public void setOldssosessionids(List<OldSSOSessionIDStore> oldssosessionids) {
+ this.oldssosessionids = oldssosessionids;
+ }
+
+ /**
+ * @return the pendingRequestID
+ */
+ public String getPendingRequestID() {
+ return pendingRequestID;
+ }
+
+ /**
+ * @param pendingRequestID the pendingRequestID to set
+ */
+ public void setPendingRequestID(String pendingRequestID) {
+ this.pendingRequestID = pendingRequestID;
+ }
+
+
+}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java
new file mode 100644
index 000000000..6e0f47805
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java
@@ -0,0 +1,87 @@
+package at.gv.egovernment.moa.id.commons.db.dao.session;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.PrePersist;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+import org.hibernate.annotations.DynamicUpdate;
+import org.hibernate.annotations.NamedQueries;
+import org.hibernate.annotations.NamedQuery;
+
+@Entity
+@DynamicUpdate(value=true)
+@Table(name = "oasessionstore")
+
+public class OASessionStore implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "idOASession", unique=true, nullable=false)
+ private long idOASession;
+
+ @Column(name = "oaurlprefix", unique=false, nullable=false)
+ private String oaurlprefix;
+
+ @Column(name = "created", updatable=false, nullable=false)
+// @Temporal(TemporalType.TIMESTAMP)
+ private Date created;
+
+// @PrePersist
+// protected void created() {
+// this.created = new Date();
+// }
+
+ @ManyToOne(fetch=FetchType.LAZY)
+ @JoinColumn(name = "moasession")
+ private AuthenticatedSessionStore moasession;
+
+ public long getIdOASession() {
+ return idOASession;
+ }
+
+ public void setIdOASession(long idOASession) {
+ this.idOASession = idOASession;
+ }
+
+ public String getOaurlprefix() {
+ return oaurlprefix;
+ }
+
+ public void setOaurlprefix(String oaurlprefix) {
+ this.oaurlprefix = oaurlprefix;
+ }
+
+ public AuthenticatedSessionStore getMoasession() {
+ return moasession;
+ }
+
+ public void setMoasession(AuthenticatedSessionStore moasession) {
+ this.moasession = moasession;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+
+
+}
+
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java
new file mode 100644
index 000000000..3ec2babad
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java
@@ -0,0 +1,69 @@
+package at.gv.egovernment.moa.id.commons.db.dao.session;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.DynamicUpdate;
+import org.hibernate.annotations.NamedQueries;
+import org.hibernate.annotations.NamedQuery;
+
+@Entity
+@DynamicUpdate(value=true)
+@Table(name = "oldssosessionid")
+
+@NamedQueries({
+ @NamedQuery(name="getSSOSessionWithOldSessionID", query = "select oldssosessionid from OldSSOSessionIDStore oldssosessionid where oldssosessionid.oldsessionid = :sessionid")
+})
+
+public class OldSSOSessionIDStore implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "idOldSSOSession", unique=true, nullable=false)
+ private long idOldSSOSession;
+
+ @Column(name = "oldsessionid", unique=true, nullable=false)
+ private String oldsessionid;
+
+ //@ManyToOne(fetch=FetchType.LAZY)
+ @ManyToOne(fetch=FetchType.LAZY)
+ @JoinColumn(name = "moasession")
+ private AuthenticatedSessionStore moasession;
+
+ public long getIdOldSSOSession() {
+ return idOldSSOSession;
+ }
+
+ public void setIdOldSSOSession(long idOldSSOSession) {
+ this.idOldSSOSession = idOldSSOSession;
+ }
+
+ public String getOldsessionid() {
+ return oldsessionid;
+ }
+
+ public void setOldsessionid(String oldsessionid) {
+ this.oldsessionid = oldsessionid;
+ }
+
+ public AuthenticatedSessionStore getMoasession() {
+ return moasession;
+ }
+
+ public void setMoasession(AuthenticatedSessionStore moasession) {
+ this.moasession = moasession;
+ }
+
+
+}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java
new file mode 100644
index 000000000..169d31aac
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java
@@ -0,0 +1,22 @@
+package at.gv.egovernment.moa.id.commons.db.ex;
+
+public class MOADatabaseException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public MOADatabaseException() {
+ super();
+ }
+
+ public MOADatabaseException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public MOADatabaseException(String message) {
+ super(message);
+ }
+
+ public MOADatabaseException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/id/server/moa-id-commons/src/main/resources/config/bindings.xjb b/id/server/moa-id-commons/src/main/resources/config/bindings.xjb
new file mode 100644
index 000000000..6269e2dbc
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/resources/config/bindings.xjb
@@ -0,0 +1,10 @@
+<jaxb:bindings version="1.0"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <jaxb:bindings schemaLocation="moaid_config_2.0.xsd" node="/xsd:schema">
+ <jaxb:globalBindings localScoping="toplevel">
+ <jaxb:serializable/>
+ </jaxb:globalBindings>
+ </jaxb:bindings>
+</jaxb:bindings> \ No newline at end of file
diff --git a/id/server/moa-id-commons/src/main/resources/config/hibernate.cfg.xml b/id/server/moa-id-commons/src/main/resources/config/hibernate.cfg.xml
new file mode 100644
index 000000000..4841481b6
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/resources/config/hibernate.cfg.xml
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+ <!-- MOA Session handling mapping files -->
+ <mapping class="at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore"/>
+ <mapping class="at.gv.egovernment.moa.id.commons.db.dao.session.AuthenticatedSessionStore"/>
+ <mapping class="at.gv.egovernment.moa.id.commons.db.dao.session.OASessionStore"/>
+ <mapping class="at.gv.egovernment.moa.id.commons.db.dao.session.OldSSOSessionIDStore"/>
+ </session-factory>
+</hibernate-configuration> \ No newline at end of file
diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
new file mode 100644
index 000000000..06f0f0bcb
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
@@ -0,0 +1,951 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Mit XMLSpy v2013 sp1 (http://www.altova.com) von Thomas Lenz (Graz University of Technology IAIK) bearbeitet -->
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0.0">
+ <xsd:complexType name="OnlineApplication">
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="friendlyName" type="xsd:string" use="optional"/>
+ <xsd:attribute name="target" type="xsd:string" use="optional"/>
+ <xsd:attribute name="targetFriendlyName" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <!-- ### Identification elements ### -->
+ <xsd:complexType name="AbstractSimpleIdentificationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:element name="AbstractSimpleIdentification" type="AbstractSimpleIdentificationType">
+ <xsd:annotation>
+ <xsd:documentation>possibility to include common austrian primary
+ keys in human readable way, english translation not available
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <!-- ### DSIG imports ### -->
+ <xsd:complexType name="X509IssuerSerialType">
+ <xsd:sequence>
+ <xsd:element name="X509IssuerName" type="xsd:string"/>
+ <xsd:element name="X509SerialNumber" type="xsd:integer"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- ### Imported STORK resources ### -->
+ <xsd:simpleType name="QualityAuthenticationAssuranceLevelType">
+ <xsd:restriction base="xsd:integer">
+ <xsd:minInclusive value="1"/>
+ <xsd:maxInclusive value="4"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="QualityAuthenticationAssuranceLevel" type="QualityAuthenticationAssuranceLevelType"/>
+ <xsd:element name="AttributeValue" type="xsd:anyType"/>
+ <xsd:complexType name="RequestedAttributeType"/>
+ <xsd:element name="RequestedAttribute" type="RequestedAttributeType"/>
+ <xsd:simpleType name="CountryCodeType">
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="[A-Z]{2}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="RequestedAttributesType">
+ <xsd:sequence>
+ <xsd:element name="AttributeValue" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="RequestedAttributes" type="RequestedAttributesType"/>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation -->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent_General" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der
+ Authentisierungs-Komponente
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="AuthComponentType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent_General" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der
+ Proxy-Komponente
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw.
+ Proxykomponente und Authenttisierungskomponente
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter_Proxy" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung
+ von der Proxy-Komponente zur Auth-Komponente (vgl.
+ AuthComponent/MOA-SP/ConnectionParameter)
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" type="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus ("pkix" oder
+ "chaining") für die Zertifikatspfadvalidierung
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender
+ ChiningMode kann für jeden TrustAnchor gesetzt werden
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das
+ vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate
+ enthält.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ <xsd:enumeration value="AuthenticationServer.KeepAssertion"/>
+ <xsd:enumeration value="AuthenticationServer.WriteAssertionToFile"/>
+ <xsd:enumeration value="AuthenticationServer.SourceID"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="DefaultBKUs">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="OnlineBKU" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:element name="HandyBKU" type="xsd:anyURI"/>
+ <xsd:element name="LocalBKU" type="xsd:anyURI"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SLRequestTemplates">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="OnlineBKU" type="xsd:anyURI"/>
+ <xsd:element name="HandyBKU" type="xsd:anyURI"/>
+ <xsd:element name="LocalBKU" type="xsd:anyURI"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element ref="GeneralConfiguration"/>
+ <xsd:element name="Protocols">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="SAML1" minOccurs="0"/>
+ <xsd:element name="PVP2" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="PublicURLPrefix" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="IssuerName" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="Organization">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="DisplayName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="URL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="Contact" minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="LegacyAllowed">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ProtocolName" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SSO">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element name="target" type="xsd:string"/>
+ <xsd:element ref="IdentificationNumber" minOccurs="1"/>
+ </xsd:choice>
+ <xsd:attribute name="PublicURL" type="xsd:string"/>
+ <xsd:attribute name="FriendlyName" type="xsd:string"/>
+ <xsd:attribute name="SpecialText" type="xsd:string"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem
+ Security-Layer
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthaelt Konfiguratiosnparameter für die
+ Kommunikation mit dem MOA SP Modul
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von
+ der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den
+ Endpunkt des Server; wird das Schema "https" verwendet müssen
+ die Kind-Elemente angegeben werden; wird das Schema "http"
+ verwendet dürfen keine Kind-Elemente angegeben werden; wird das
+ Element nicht verwendet dann wird MOA-SP über das API
+ aufgerufen
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der
+ Personenbindung
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des
+ AUTH-Blocks
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers
+ des IdentityLinks
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden
+ per X509SubjectName (Kodierung nach RFC 2253) identifiziert
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ForeignIdentities" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>Verbindungsparameter zum SZR-Gateway
+ (GetIdentityLink)
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="STORK" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Verbindungsparameter zu den Country-PEPS
+ (C-PEPS)
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineMandates" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>Verbindungsparameter zum
+ Online-Vollmachten-Service
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit
+ globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese
+ TransformsInfo werden in den CreateXMLSignatureRequest fuer die
+ Signatur des AUTH-Blocks inkludiert
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="transformation" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0" maxOccurs="3"/>
+ <xsd:element name="AditionalAuthBlockText" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des
+ Templates
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyInfoboxesType">
+ <xsd:annotation>
+ <xsd:documentation>Verifikation zusaetzlicher Infoboxen
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="DefaultTrustProfile" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionales DefaultTrustprofil für die
+ Überprüfung aller weiteren Infoboxen
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SchemaLocationType">
+ <xsd:annotation>
+ <xsd:documentation>Spezifiziert die Lage von XML Schemas
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="Schema" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="isActive" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="AuthComponent_OA" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die
+ Authentisierungs-Komponente betreffen
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="BKUURLS">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="OnlineBKU" type="xsd:anyURI" minOccurs="1"/>
+ <xsd:element name="HandyBKU" type="xsd:anyURI" minOccurs="1"/>
+ <xsd:element name="LocalBKU" type="xsd:anyURI" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="IdentificationNumber" minOccurs="0"/>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="Mandates" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Profiles" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="STORK" minOccurs="0"/>
+ <xsd:element name="OA_SSO" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UseSSO" type="xsd:boolean"/>
+ <xsd:element name="AuthDataFrame" type="xsd:boolean" default="true"/>
+ <xsd:element name="SingleLogOutURL" type="xsd:anyURI"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="OA_SAML1" minOccurs="0"/>
+ <xsd:element ref="OA_PVP2" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="useIFrame" type="xsd:boolean" default="false"/>
+ <xsd:attribute name="useUTC" type="xsd:boolean" default="true"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0"
+ maxOccurs="1"/ -->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent_OA" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die
+ Proxy-Komponente betreffen
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die
+ Proxy-Komponente betreffen
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte
+ Server-Zertifikate der TLS-Verbindung enthält (keine
+ CA-Zertifikate)
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten
+ Schlüssel, der für die TLS-Client-Authentisierung verwendet
+ wird, enthält
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="CompatibilityMode" default="false">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="EnableInfoboxValidator" default="true">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="AlwaysShowForm" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Soll nicht nur bei leerer oder standardisierter
+ Vollmacht mit unvollständigen Daten, sondern beispielsweise zu
+ Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein
+ Einschreiten durch berufliche Parteienvertretung geschieht so kann
+ dies mittels dieses Schalters veranlasst werden
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:complexType name="InputProcessorType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="template" type="xsd:anyURI" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Das Attribut spezifiziert die Lage des
+ Templates, welches der InputProcessor zur Darstellung des
+ Eingabeformulars nutzen soll
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentationType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default InputProcessor. Konfiguration eines vom
+ Standardprozess abweichenden Verarbeitungsvorgangs bei der
+ beruflichen Parteienvertretung. Der Wert dieses Elements ist der
+ vollständige Klassenname des InputProzessors
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Wert fuer Formularanzeige. Soll nicht nur
+ bei leerer oder standardisierter Vollmacht mit unvollstaendigen
+ Daten, sondern beispielsweise zu Kontrollzwecken das
+ Eingabeformular zur vervollstaendigung der Vertretenendaten immer
+ angezeigt werden, wenn ein Einschreiten durch berufliche
+ Parteienvertretung geschieht so kann dies mittels dieses Schalters
+ veranlasst werden
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway
+ (für den EGIZ-Demonstrator im internen Netzwerk:
+ https://129.27.142.5:8443/szr-gateway/services/MandateCreation)
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentative" type="PartyRepresentativeType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Falls keine speziellen beruflichen
+ ParteienvertreterInnen definiert sind (Element kommt nicht vor),
+ werden ausschließlich standardisierte Vollmachten mit einer
+ MandateID="*" akzeptiert
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentativeType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Konfiguration eines vom Standardprozess
+ abweichenden Verarbeitungsvorgangs bei der beruflichen
+ Parteienvertretung. Der Wert dieses Elements ist der vollständige
+ Klassenname des InputProzessors
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0"/>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionale Verbindungsparameter zu speziellem
+ (SZR-)Gateway
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="oid" use="required">
+ <xsd:annotation>
+ <xsd:documentation>OID der Parteienvertretung lt. "Object Identifier
+ der öffentlichen Verwaltung" - Konvention, Empfehlung. Diese ID
+ muss mit der MandateID der übermittelten standardisierten Vollmacht
+ übereinstimmen. Eine Parteienvertretung für standardisierte
+ Vollmachten mit der MandateID "*" muss nicht definiert werden und
+ erlaubt eine allgemeine berufliche Parteienvertretung mit
+ Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels
+ dieses Attributs zu definieren
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="representPhysicalParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für
+ natürliche Personen erlaubt ist
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representCorporateParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für
+ juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht
+ vertreten darf und dieser Wert aus diesem Grund dort false sein
+ muss)
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representationText" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Beschreibender Text, der an Stelle des
+ Standardtexts bei der Signatur der Anmeldedaten im Falle einer
+ vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt
+ wird
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="SignatureCreationParameterType">
+ <xsd:annotation>
+ <xsd:documentation>Enthaelt Informationen zu einem KeyStore bzw. Key
+ zur STORK SAML AuthnRequest Signaturerstellung
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element ref="KeyStore"/>
+ <xsd:element ref="KeyName"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SignatureVerificationParameterType">
+ <xsd:annotation>
+ <xsd:documentation>Enthaelt Informationen zur Verfikation von
+ Signaturen einer STORK SAML Response
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="SAMLSigningParameter">
+ <xsd:annotation>
+ <xsd:documentation>Enthält Informationen zur Erstellung und
+ Verifikation von STORK SAML Messages
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="SignatureCreationParameter" type="SignatureCreationParameterType"/>
+ <xsd:element name="SignatureVerificationParameter" type="SignatureVerificationParameterType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="KeyStore">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel
+ zum Erstellen einer Signatur enthält
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="KeyName">
+ <xsd:annotation>
+ <xsd:documentation>Name zum Key eines KeyStores, der den privaten
+ Schlüssel zum Erstellen einer Signatur darstellt
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="C-PEPS">
+ <xsd:annotation>
+ <xsd:documentation>Enthält Informationen zu einem Citizen Country
+ PEPS (C-PEPS)
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AttributeValue" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="countryCode" type="CountryCodeType" use="required"/>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="STORK">
+ <xsd:annotation>
+ <xsd:documentation>Contains STORK related information
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element ref="C-PEPS" maxOccurs="unbounded"/>
+ <xsd:element ref="SAMLSigningParameter"/>
+ </xsd:sequence>
+ <xsd:sequence>
+ <xsd:element ref="QualityAuthenticationAssuranceLevel" minOccurs="0"/>
+ <xsd:element ref="RequestedAttributes"/>
+ </xsd:sequence>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OA_SAML1">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="provideStammzahl" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="provideAUTHBlock" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="provideIdentityLink" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="provideCertificate" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="provideFullMandatorData" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="useCondition" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="conditionLength" type="xsd:integer" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="sourceID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OA_PVP2">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="metadataURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="certificate" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="GeneralConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TimeOuts">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Assertion" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="MOASessionCreated" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="MOASessionUpdated" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="AlternativeSourceID" type="xsd:string"/>
+ <xsd:element name="CertStoreDirectory" type="xsd:anyURI"/>
+ <xsd:element name="TrustManagerRevocationChecking" type="xsd:boolean" default="true"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentificationNumber">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:string"/>
+ <xsd:element name="Value" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Contact">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="SurName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="GivenName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="Mail" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
+ <xsd:element name="Type" minOccurs="1" maxOccurs="1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="technical"/>
+ <xsd:enumeration value="support"/>
+ <xsd:enumeration value="administrative"/>
+ <xsd:enumeration value="billing"/>
+ <xsd:enumeration value="other"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="Company" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="Phone" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="UserDatabase">
+ <xsd:sequence>
+ <xsd:element name="bpk" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="familyname" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="givenname" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="institut" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="mail" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="phone" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="username" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="password" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="isActive" type="xsd:boolean" default="true" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="isAdmin" type="xsd:boolean" default="true" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="lastLogin" type="xsd:date" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="OnlineApplication" type="OnlineApplication" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml b/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml
new file mode 100644
index 000000000..25092ff58
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
+http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <persistence-unit name="##generated">
+ <!-- <class>at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase</class> -->
+
+<!-- <properties>
+ C3p0 connection pooling configuration
+ <property name="hibernate.connection.provider_class" value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider"/>
+ <property name="hibernate.connection.provider_class" value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider"/>
+ <property name="acquireRetryDelay" value="5000"/>
+ <property name="breakAfterAcquireFailure" value="true"/>
+ <property name="checkoutTimeout" value="1"/>
+ <property name="testConnectionOnCheckin" value="1" />
+ </properties> -->
+ </persistence-unit>
+</persistence>