diff options
author | Vitaly Takmazov | 2016-07-20 15:12:34 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-07-20 15:12:34 +0300 |
commit | c19397fb6d4635120a1a8cdaef6d66f0b36e3c4b (patch) | |
tree | 8840145f5eeefcf72715c80d00c9898555c32b35 /juick-www/src/main/java/com/juick/www | |
parent | d5d21e26157f7a5821a68f53e043ad88b150fca3 (diff) |
DriverManagerDataSource -> BasicDataSource
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/Main.java | 6 |
1 files changed, 3 insertions, 3 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 c39c152c..d7ecd0cb 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); |