Skip to content
This repository has been archived by the owner on Jan 19, 2020. It is now read-only.

Commit

Permalink
Another attempt to fix incorrect H2 shutdown procedure - by using c3p0.
Browse files Browse the repository at this point in the history
  • Loading branch information
zlogic committed Nov 18, 2015
1 parent 89ae9d1 commit b20d312
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions att-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
Expand Down
1 change: 1 addition & 0 deletions att-data/src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<!--<property name="hibernate.show_sql" value="true" />-->
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
<property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider"/>
</properties>
</persistence-unit>
</persistence>
3 changes: 3 additions & 0 deletions att-resources/src/main/resources/logging.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void changed(ObservableValue<? extends TimeSegmentAdapter> 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() {
Expand Down
12 changes: 5 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
<name>Zlogic</name>
</organization>

<repositories>
<repository>
<id>jasperreports</id>
<url>http://jasperreports.sourceforge.net/maven2</url>
</repository>
</repositories>

<properties>
<version.java>1.8</version.java>
<version.java.launch4j>1.8.0</version.java.launch4j>
Expand Down Expand Up @@ -100,6 +93,11 @@
<artifactId>hibernate-jpamodelgen</artifactId>
<version>5.0.3.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>5.0.3.Final</version>
</dependency>
<dependency>
<groupId>net.sourceforge.dynamicreports</groupId>
<artifactId>dynamicreports-core</artifactId>
Expand Down

0 comments on commit b20d312

Please sign in to comment.