aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/xmpp/s2s
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/xmpp/s2s')
-rw-r--r--juick-www/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java b/juick-www/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
index 4fb40e23..57072cee 100644
--- a/juick-www/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
+++ b/juick-www/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java
@@ -8,6 +8,8 @@ import com.juick.xmpp.*;
import com.juick.xmpp.extensions.JuickMessage;
import com.juick.xmpp.extensions.Nickname;
import com.juick.xmpp.extensions.XOOB;
+import org.apache.commons.dbcp2.BasicDataSource;
+import org.apache.commons.dbcp2.PoolingDataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.xmlpull.v1.XmlPullParserException;
@@ -184,7 +186,7 @@ public class XMPPComponent implements ServletContextListener, Stream.StreamListe
keystorePassword = conf.getProperty("keystore_password");
brokenSSLhosts = Arrays.asList(conf.getProperty("broken_ssl_hosts", "").split(","));
bannedHosts = Arrays.asList(conf.getProperty("banned_hosts", "").split(","));
- DriverManagerDataSource dataSource = new DriverManagerDataSource();
+ BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(conf.getProperty("datasource_driver", "com.mysql.jdbc.Driver"));
dataSource.setUrl(conf.getProperty("datasource_url"));
sql = new JdbcTemplate(dataSource);