aboutsummaryrefslogtreecommitdiffstats
path: root/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
diff options
context:
space:
mode:
authorRich Tabedzki <richard.tabedzki@att.com>2017-09-15 01:02:37 +0000
committerRich Tabedzki <richard.tabedzki@att.com>2017-09-15 02:46:44 +0000
commitd3913648518ce15fe7a74275394b86d0ecfb32a4 (patch)
tree22d9a0acf5a9e4913a538cd31a3510052b3e5d59 /dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
parent871e2b160680d521a6fc96abe745b96d91c9cee6 (diff)
Prepared DBLIB for multi-verndor JDBC Driver
Changes made: 1. removed hardcoded JDBC driver's name and made it a property. 2. Optimized connection pool initialization 3. Removed unused factories. Change-Id: Id1d1868f7f1a6ae5a0429a97403042a8f6ee78d3 Issue-ID: CCSDK-92 Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com>
Diffstat (limited to 'dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java')
-rwxr-xr-x[-rw-r--r--]dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
index ee8ab2f3..a5902d54 100644..100755
--- a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
@@ -20,7 +20,6 @@
package org.onap.ccsdk.sli.core.dblib;
-import com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException;
import org.apache.tomcat.jdbc.pool.PoolExhaustedException;
import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitor;
@@ -535,7 +534,7 @@ public abstract class CachedDataSource implements DataSource, SQLExecutionMonito
return monitor;
}
- protected boolean isSlave() throws PoolExhaustedException, MySQLNonTransientConnectionException {
+ protected boolean isSlave() throws PoolExhaustedException {
CachedRowSet rs = null;
boolean isSlave = true;
String hostname = "UNDETERMINED";
@@ -547,7 +546,7 @@ public abstract class CachedDataSource implements DataSource, SQLExecutionMonito
hostname = rs.getString(2);
}
isSlave = localSlave;
- } catch(PoolExhaustedException | MySQLNonTransientConnectionException peexc){
+ } catch(PoolExhaustedException peexc){
throw peexc;
} catch (SQLException e) {
LOGGER.error("", e);