From 8127b4f7fa5ce068064ca36ccf18b97d57dd0192 Mon Sep 17 00:00:00 2001 From: Frank de Lange Date: Thu, 10 Jan 2019 02:53:52 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20#860=20(external=20database=20performance?= =?UTF-8?q?)=20by=20using=20connection=20pooling=20=E2=80=A6=20(#864)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix #860 (external database performance) by using connection pooling (using commons-dbcp2) --- airsonic-main/pom.xml | 17 +++++++++++++++++ .../resources/applicationContext-db-embed.xml | 4 ++-- .../src/test/resources/application.properties | 4 ++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/airsonic-main/pom.xml b/airsonic-main/pom.xml index b6f08b75..b4eda4b6 100755 --- a/airsonic-main/pom.xml +++ b/airsonic-main/pom.xml @@ -143,6 +143,23 @@ runtime + + + org.apache.commons + commons-dbcp2 + 2.5.0 + runtime + + + + commons-logging + commons-logging + + + + + + commons-fileupload commons-fileupload diff --git a/airsonic-main/src/main/resources/applicationContext-db-embed.xml b/airsonic-main/src/main/resources/applicationContext-db-embed.xml index 5a60fea8..2668caa6 100644 --- a/airsonic-main/src/main/resources/applicationContext-db-embed.xml +++ b/airsonic-main/src/main/resources/applicationContext-db-embed.xml @@ -4,11 +4,11 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd" profile="embed"> + class="org.apache.commons.dbcp2.BasicDataSource"> - \ No newline at end of file + diff --git a/airsonic-main/src/test/resources/application.properties b/airsonic-main/src/test/resources/application.properties index 29c1c5dd..6d6640b1 100644 --- a/airsonic-main/src/test/resources/application.properties +++ b/airsonic-main/src/test/resources/application.properties @@ -6,8 +6,8 @@ logging.level.org.airsonic=INFO logging.level.liquibase=INFO logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p){green} %clr(---){faint} %clr(%-40.40logger{32}){blue} %clr(:){faint} %m%n%wEx logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- %-40.40logger{32} : %m%n%wEx -DatabaseConfigType=embed +DatabaseConfigType=legacy DatabaseConfigEmbedDriver=org.hsqldb.jdbcDriver DatabaseConfigEmbedUrl=jdbc:hsqldb:mem:airsonic DatabaseConfigEmbedUsername=sa -DatabaseConfigEmbedPassword= \ No newline at end of file +DatabaseConfigEmbedPassword=