aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-03-31 13:08:02 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-03-31 13:08:02 +0200
commite5d84e80b836ed0939e1546300d75fd93b637d8b (patch)
treef294bd7908fd93792b2d39c45e8ef43162451505 /id/server/moa-id-commons/src
parent578f88516c9b2b3d61d19cd82a821b9c85a573d1 (diff)
downloadmoa-id-spss-e5d84e80b836ed0939e1546300d75fd93b637d8b.tar.gz
moa-id-spss-e5d84e80b836ed0939e1546300d75fd93b637d8b.tar.bz2
moa-id-spss-e5d84e80b836ed0939e1546300d75fd93b637d8b.zip
update Hibernate, JPA and mySQL libraries
Diffstat (limited to 'id/server/moa-id-commons/src')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java7
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java7
2 files changed, 12 insertions, 2 deletions
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 0065f2242..76215528d 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
@@ -29,6 +29,7 @@ import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
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;
@@ -67,7 +68,11 @@ public final class MOASessionDBUtils {
Logger.debug("Creating initial MOASession session factory...");
config.configure("hibernate_moasession.cfg.xml");
- serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry();
+ //serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry();
+
+ serviceRegistry = new StandardServiceRegistryBuilder().
+ applySettings(config.getProperties()).build();
+
sessionFactory = config.buildSessionFactory(serviceRegistry);
Logger.debug("Initial MOASession session factory successfully created.");
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 fac653eb2..eac47f93f 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
@@ -29,6 +29,7 @@ import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
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;
@@ -67,7 +68,11 @@ public final class StatisticLogDBUtils {
Logger.debug("Creating initial StatisicLogger session factory...");
config.configure("hibernate_statistic.cfg.xml");
- serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry();
+ //serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry();
+
+ serviceRegistry = new StandardServiceRegistryBuilder().
+ applySettings(config.getProperties()).build();
+
sessionFactory = config.buildSessionFactory(serviceRegistry);
Logger.debug("Initial StatisicLogger session factory successfully created.");