Added some parameters and properties to the MySQL setup
Change-Id: I2b6440febb7ccf4be36753a7366d596253ca5953
diff --git a/src/main/resources/default-config.xml b/src/main/resources/default-config.xml
index 62d5997..7d49e91 100644
--- a/src/main/resources/default-config.xml
+++ b/src/main/resources/default-config.xml
@@ -56,19 +56,22 @@
<!--class="org.apache.commons.dbcp2.BasicDataSource"-->
<!-- org.springframework.jdbc.datasource.SingleConnectionDataSource -->
- <bean id="dataSource"
- class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
+ <bean id="dataSource"
+ class="org.apache.commons.dbcp2.BasicDataSource"
lazy-init="true">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<!-- relevant for single connection datasource and sqlite -->
- <property name="suppressClose">
+ <!-- <property name="suppressClose">
<value>true</value>
- </property>
+ </property> -->
<!--<property name="initialSize" value="2"/>-->
- <!--<property name="maxIdle" value="2"/>-->
+ <property name="maxTotal" value="4"/>
+ <property name="maxIdle" value="2"/>
+ <property name="minIdle" value="1"/>
+ <property name="maxWaitMillis" value="15000"/>
<!--<property name="poolPreparedStatements" value="true"/>-->
</bean>
diff --git a/src/test/java/de/ids_mannheim/korap/security/ResourcesTest.java b/src/test/java/de/ids_mannheim/korap/security/ResourcesTest.java
index 131d0bc..72dd407 100644
--- a/src/test/java/de/ids_mannheim/korap/security/ResourcesTest.java
+++ b/src/test/java/de/ids_mannheim/korap/security/ResourcesTest.java
@@ -103,7 +103,7 @@
Set s = ResourceFinder.searchPublic(Corpus.class);
assertEquals(2, s.size());
s = ResourceFinder.searchPublic(Foundry.class);
- assertEquals(7, s.size());
+ assertEquals(10, s.size());
}