summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--datacollector/pom.xml5
-rw-r--r--datacollector/src/main/java/org/onap/rapp/datacollector/service/configuration/DmaapRestReaderConfiguration.java5
-rw-r--r--pom.xml1
3 files changed, 9 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());
diff --git a/pom.xml b/pom.xml
index 16847dd..d2896e5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,7 @@
<gson.version>2.8.6</gson.version>
<javax.xml.bind.version>2.3.0</javax.xml.bind.version>
<swagger.version>2.9.2</swagger.version>
+ <dbcp.version>1.2.2</dbcp.version>
<swagger.maven.plugin.version>3.1.7</swagger.maven.plugin.version>
</properties>