From b20d31256176718b60cb89907e6826c2eceb66d3 Mon Sep 17 00:00:00 2001 From: Dmitry Zolotukhin Date: Sat, 7 Nov 2015 01:07:07 +0300 Subject: [PATCH] Another attempt to fix incorrect H2 shutdown procedure - by using c3p0. --- att-data/pom.xml | 4 ++++ att-data/src/main/resources/META-INF/persistence.xml | 1 + att-resources/src/main/resources/logging.properties | 3 +++ .../att/ui/CurrentTaskNotificationController.java | 2 +- pom.xml | 12 +++++------- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/att-data/pom.xml b/att-data/pom.xml index 99ef39a..7b7e1d4 100644 --- a/att-data/pom.xml +++ b/att-data/pom.xml @@ -43,6 +43,10 @@ org.hibernate hibernate-entitymanager + + org.hibernate + hibernate-c3p0 + org.hibernate hibernate-jpamodelgen diff --git a/att-data/src/main/resources/META-INF/persistence.xml b/att-data/src/main/resources/META-INF/persistence.xml index 692baef..f119d91 100644 --- a/att-data/src/main/resources/META-INF/persistence.xml +++ b/att-data/src/main/resources/META-INF/persistence.xml @@ -18,6 +18,7 @@ + diff --git a/att-resources/src/main/resources/logging.properties b/att-resources/src/main/resources/logging.properties index 9a402d8..d40e278 100644 --- a/att-resources/src/main/resources/logging.properties +++ b/att-resources/src/main/resources/logging.properties @@ -14,5 +14,8 @@ org.hibernate.level = SEVERE org.hibernate.hql.internal.ast.QueryTranslatorImpl.level = SEVERE org.hibernate.tool.hbm2ddl.SchemaUpdate.level = OFF +#Disable non-critical c3p0 messages +com.mchange.v2.level = SEVERE + #Disable console redirection output Console.level = OFF diff --git a/att-ui/src/main/java/org/zlogic/att/ui/CurrentTaskNotificationController.java b/att-ui/src/main/java/org/zlogic/att/ui/CurrentTaskNotificationController.java index 5f874d6..deb6c45 100644 --- a/att-ui/src/main/java/org/zlogic/att/ui/CurrentTaskNotificationController.java +++ b/att-ui/src/main/java/org/zlogic/att/ui/CurrentTaskNotificationController.java @@ -152,7 +152,7 @@ public void changed(ObservableValue ov, TimeSegmen if (displayInterval > 0) { notificationTimer = new Timer(true); TimerTask showNotificationTask = new TimerTask() { - private TimerRapidFiringDetector timerMissedEventConsumer = new TimerRapidFiringDetector(); + private TimerRapidFiringDetector timerMissedEventConsumer = new TimerRapidFiringDetector(displayInterval / 4); @Override public void run() { diff --git a/pom.xml b/pom.xml index 00562fd..5029948 100644 --- a/pom.xml +++ b/pom.xml @@ -14,13 +14,6 @@ Zlogic - - - jasperreports - http://jasperreports.sourceforge.net/maven2 - - - 1.8 1.8.0 @@ -100,6 +93,11 @@ hibernate-jpamodelgen 5.0.3.Final + + org.hibernate + hibernate-c3p0 + 5.0.3.Final + net.sourceforge.dynamicreports dynamicreports-core