diff options
Diffstat (limited to 'datacollector')
-rw-r--r-- | datacollector/pom.xml | 5 | ||||
-rw-r--r-- | datacollector/src/main/java/org/onap/rapp/datacollector/service/configuration/DmaapRestReaderConfiguration.java | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/datacollector/pom.xml b/datacollector/pom.xml index db59334..0c2467c 100644 --- a/datacollector/pom.xml +++ b/datacollector/pom.xml @@ -81,6 +81,11 @@ <artifactId>jaxb-api</artifactId> <version>${javax.xml.bind.version}</version> </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>${dbcp.version}</version> + </dependency> </dependencies> <build> diff --git a/datacollector/src/main/java/org/onap/rapp/datacollector/service/configuration/DmaapRestReaderConfiguration.java b/datacollector/src/main/java/org/onap/rapp/datacollector/service/configuration/DmaapRestReaderConfiguration.java index 9752fb5..ab1bd0a 100644 --- a/datacollector/src/main/java/org/onap/rapp/datacollector/service/configuration/DmaapRestReaderConfiguration.java +++ b/datacollector/src/main/java/org/onap/rapp/datacollector/service/configuration/DmaapRestReaderConfiguration.java @@ -30,6 +30,8 @@ import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import javax.sql.DataSource; + +import org.apache.commons.dbcp.BasicDataSource; import org.apache.http.client.HttpClient; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.TrustAllStrategy; @@ -40,7 +42,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.jdbc.datasource.DataSourceTransactionManager; -import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.web.client.RestTemplate; @@ -128,7 +129,7 @@ public class DmaapRestReaderConfiguration { @Bean public DataSource dataSource() { - DriverManagerDataSource dataSource = new DriverManagerDataSource(); + BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName(databaseProperties.getDriverClassName()); dataSource.setUrl("jdbc:mysql://" + databaseProperties.getHost() + ":" + databaseProperties.getPort() + "/" + databaseProperties.getName()); dataSource.setUsername(databaseProperties.getUsername()); |