aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java6
-rw-r--r--juick-www/src/main/java/com/juick/xmpp/s2s/XMPPComponent.java4
2 files changed, 6 insertions, 4 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index c39c152c7..d7ecd0cb0 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -21,8 +21,8 @@ import com.juick.server.UserQueries;
import com.juick.xmpp.JID;
import com.juick.xmpp.Stream;
import com.juick.xmpp.StreamComponent;
+import org.apache.commons.dbcp2.BasicDataSource;
import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.jdbc.datasource.DriverManagerDataSource;
import ru.sape.Sape;
import javax.servlet.ServletException;
@@ -71,10 +71,10 @@ public class Main extends HttpServlet implements Stream.StreamListener {
Properties conf = new Properties();
conf.load(getServletContext().getResourceAsStream("/WEB-INF/juick.conf"));
- DriverManagerDataSource dataSource = new DriverManagerDataSource();
+ BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(conf.getProperty("datasource_driver", "com.mysql.jdbc.Driver"));
dataSource.setUrl(conf.getProperty("datasource_url"));
- DriverManagerDataSource dataSourceSearch = new DriverManagerDataSource();
+ BasicDataSource dataSourceSearch = new BasicDataSource();
dataSourceSearch.setDriverClassName(conf.getProperty("datasource_driver", "com.mysql.jdbc.Driver"));
dataSourceSearch.setUrl(sqlSearchConnStr);
sql = new JdbcTemplate(dataSource);
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 4fb40e23c..57072ceef 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);