aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/xmpp
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-20 15:12:34 +0300
committerGravatar Vitaly Takmazov2016-07-20 15:12:34 +0300
commitc19397fb6d4635120a1a8cdaef6d66f0b36e3c4b (patch)
tree8840145f5eeefcf72715c80d00c9898555c32b35 /juick-www/src/main/java/com/juick/xmpp
parentd5d21e26157f7a5821a68f53e043ad88b150fca3 (diff)
DriverManagerDataSource -> BasicDataSource
Diffstat (limited to 'juick-www/src/main/java/com/juick/xmpp')
-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);