diff options
Diffstat (limited to 'dblib')
-rwxr-xr-x | dblib/pom.xml | 4 | ||||
-rwxr-xr-x | dblib/provider/pom.xml | 9 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java) | 15 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceFactory.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSourceFactory.java) | 14 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBConfigException.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBConfigException.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLIBResourceActivator.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLIBResourceActivator.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibConnection.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibConnection.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibException.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibException.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceManager.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java) | 41 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceObserver.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceObserver.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataAccessor.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataAccessor.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataSourceComparator.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataSourceComparator.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DbLibService.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DbLibService.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DblibConfigurationException.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DblibConfigurationException.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/NoAvailableConnectionsException.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/NoAvailableConnectionsException.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/TerminatingCachedDataSource.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/TerminatingCachedDataSource.java) | 10 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/BaseDBConfiguration.java) | 34 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/DbConfigPool.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/JDBCConfiguration.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/JDBCConfiguration.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractDBResourceManagerFactory.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractDBResourceManagerFactory.java) | 8 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractResourceManagerFactory.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractResourceManagerFactory.java) | 20 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/DBConfigFactory.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/DBConfigFactory.java) | 13 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/FactoryNotDefinedException.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/FactoryNotDefinedException.java) | 6 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDBCachedDataSource.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java) | 14 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDbResourceManagerFactory.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDbResourceManagerFactory.java) | 20 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/MySQLCachedDataSource.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java) | 14 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/PollingWorker.java) | 42 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitor.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitor.java) | 8 | ||||
-rw-r--r-- | dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitorObserver.java (renamed from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitorObserver.java) | 6 | ||||
-rwxr-xr-x | dblib/provider/src/main/resources/dblib.properties | 24 |
30 files changed, 186 insertions, 188 deletions
diff --git a/dblib/pom.xml b/dblib/pom.xml index 722b2d7c6..775ff0591 100755 --- a/dblib/pom.xml +++ b/dblib/pom.xml @@ -34,9 +34,9 @@ <inceptionYear>2016</inceptionYear> - <organizationName>AT&T</organizationName> + <organizationName>ONAP</organizationName> - <projectName>openecomp</projectName> + <projectName>onap</projectName> <roots> diff --git a/dblib/provider/pom.xml b/dblib/provider/pom.xml index 078c75499..41d383ef0 100755 --- a/dblib/provider/pom.xml +++ b/dblib/provider/pom.xml @@ -63,12 +63,9 @@ <extensions>true</extensions> <configuration> <instructions> - <Bundle-SymbolicName>org.openecomp.sdnc.sli.resource.dblib</Bundle-SymbolicName> - <Bundle-Activator>org.openecomp.sdnc.sli.resource.dblib.DBLIBResourceActivator</Bundle-Activator> - <Export-Package>org.openecomp.sdnc.sli.resource.dblib;version=${project.version}</Export-Package> - <!-- - <Import-Package>org.openecomp.sdnc.sli.*,org.osgi.framework.*,org.slf4j.*,com.mysql.jdbc.*,javax.sql.*,org.apache.tomcat.*</Import-Package> - --> + <Bundle-SymbolicName>org.onap.ccsdk.sli.core.dblib</Bundle-SymbolicName> + <Bundle-Activator>org.onap.ccsdk.sli.core.dblib.DBLIBResourceActivator</Bundle-Activator> + <Export-Package>org.onap.ccsdk.sli.core.dblib;version=${project.version}</Export-Package> <Import-Package>*</Import-Package> <Embed-Transitive>true</Embed-Transitive> </instructions> diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java index 58a0aeb11..9dc262d07 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.io.Closeable; import java.io.IOException; @@ -43,10 +43,11 @@ import javax.sql.rowset.RowSetProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.tomcat.jdbc.pool.PoolExhaustedException; -import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitor; -import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitorObserver; -import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitor.TestObject; +import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration; +import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitor; +import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitorObserver; +import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitor.TestObject; + import com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSourceFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceFactory.java index 3e51ed942..07e3dfab1 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSourceFactory.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceFactory.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,13 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; -import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.jdbc.JdbcDBCachedDataSource; -import org.openecomp.sdnc.sli.resource.dblib.jdbc.MySQLCachedDataSource; +import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration; +import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration; +import org.onap.ccsdk.sli.core.dblib.jdbc.JdbcDBCachedDataSource; +import org.onap.ccsdk.sli.core.dblib.jdbc.MySQLCachedDataSource; /** * @version $Revision: 1.1 $ diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBConfigException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBConfigException.java index b324e6a2c..e41e29b5d 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBConfigException.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBConfigException.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; /** diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLIBResourceActivator.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLIBResourceActivator.java index 150a9a82f..8ae9a2665 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLIBResourceActivator.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLIBResourceActivator.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.io.File; import java.net.URL; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibConnection.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibConnection.java index 5c1f51040..8181b1300 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibConnection.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibConnection.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.sql.Array; import java.sql.Blob; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibException.java index cc80741dc..de241f478 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibException.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibException.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.sql.SQLException; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceManager.java index 5cf2953b7..78b970bf5 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceManager.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.io.PrintWriter; import java.sql.Connection; @@ -47,12 +47,13 @@ import javax.sql.DataSource; import javax.sql.rowset.CachedRowSet; import org.apache.tomcat.jdbc.pool.PoolExhaustedException; -import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool; -import org.openecomp.sdnc.sli.resource.dblib.factory.AbstractDBResourceManagerFactory; -import org.openecomp.sdnc.sli.resource.dblib.factory.AbstractResourceManagerFactory; -import org.openecomp.sdnc.sli.resource.dblib.factory.DBConfigFactory; -import org.openecomp.sdnc.sli.resource.dblib.pm.PollingWorker; -import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitor; +import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool; +import org.onap.ccsdk.sli.core.dblib.factory.AbstractDBResourceManagerFactory; +import org.onap.ccsdk.sli.core.dblib.factory.AbstractResourceManagerFactory; +import org.onap.ccsdk.sli.core.dblib.factory.DBConfigFactory; +import org.onap.ccsdk.sli.core.dblib.pm.PollingWorker; +import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitor; + import com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -108,23 +109,23 @@ public class DBResourceManager implements DataSource, DataAccessor, DBResourceOb this.configProps = props; // get retry interval value - retryInterval = getLongFromProperties(props, "org.openecomp.dblib.connection.retry", 10000L); + retryInterval = getLongFromProperties(props, "org.onap.dblib.connection.retry", 10000L); // get recovery mode flag - recoveryMode = getBooleanFromProperties(props, "org.openecomp.dblib.connection.recovery", true); + recoveryMode = getBooleanFromProperties(props, "org.onap.dblib.connection.recovery", true); if(!recoveryMode) { recoveryMode = false; LOGGER.info("Recovery Mode disabled"); } // get time out value for thread cleanup - terminationTimeOut = getLongFromProperties(props, "org.openecomp.dblib.termination.timeout", 300000L); + terminationTimeOut = getLongFromProperties(props, "org.onap.dblib.termination.timeout", 300000L); // get properties for monitoring - monitorDbResponse = getBooleanFromProperties(props, "org.openecomp.dblib.connection.monitor", false); - monitoringInterval = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.interval", 1000L); - monitoringInitialDelay = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.startdelay", 5000L); - expectedCompletionTime = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.expectedcompletiontime", 5000L); - unprocessedFailoverThreshold = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.unprocessedfailoverthreshold", 3L); + monitorDbResponse = getBooleanFromProperties(props, "org.onap.dblib.connection.monitor", false); + monitoringInterval = getLongFromProperties(props, "org.onap.dblib.connection.monitor.interval", 1000L); + monitoringInitialDelay = getLongFromProperties(props, "org.onap.dblib.connection.monitor.startdelay", 5000L); + expectedCompletionTime = getLongFromProperties(props, "org.onap.dblib.connection.monitor.expectedcompletiontime", 5000L); + unprocessedFailoverThreshold = getLongFromProperties(props, "org.onap.dblib.connection.monitor.unprocessedfailoverthreshold", 3L); // initialize performance monitor PollingWorker.createInistance(props); @@ -285,7 +286,7 @@ public class DBResourceManager implements DataSource, DataAccessor, DBResourceOb } /* (non-Javadoc) - * @see org.openecomp.sdnc.sli.resource.dblib.DbLibService#getData(java.lang.String, java.util.ArrayList, java.lang.String) + * @see org.onap.ccsdk.sli.resource.dblib.DbLibService#getData(java.lang.String, java.util.ArrayList, java.lang.String) */ @Override public CachedRowSet getData(String statement, ArrayList<String> arguments, String preferredDS) throws SQLException { @@ -412,7 +413,7 @@ public class DBResourceManager implements DataSource, DataAccessor, DBResourceOb /* (non-Javadoc) - * @see org.openecomp.sdnc.sli.resource.dblib.DbLibService#writeData(java.lang.String, java.util.ArrayList, java.lang.String) + * @see org.onap.ccsdk.sli.resource.dblib.DbLibService#writeData(java.lang.String, java.util.ArrayList, java.lang.String) */ @Override public boolean writeData(String statement, ArrayList<String> arguments, String preferredDS) throws SQLException @@ -696,7 +697,7 @@ public class DBResourceManager implements DataSource, DataAccessor, DBResourceOb } /* (non-Javadoc) - * @see org.openecomp.sdnc.sli.resource.dblib.DbLibService#isActive() + * @see org.onap.ccsdk.sli.resource.dblib.DbLibService#isActive() */ @Override public boolean isActive() { diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceObserver.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceObserver.java index e06779f35..2e1a6e953 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceObserver.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceObserver.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.util.Observer; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataAccessor.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataAccessor.java index cd054a51d..7921fa5c5 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataAccessor.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataAccessor.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.sql.SQLException; import java.util.ArrayList; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataSourceComparator.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataSourceComparator.java index 37d625136..bc14fb8b9 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataSourceComparator.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataSourceComparator.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.util.Comparator; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DbLibService.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DbLibService.java index 25edd1f07..de9846679 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DbLibService.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DbLibService.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.sql.SQLException; import java.util.ArrayList; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DblibConfigurationException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DblibConfigurationException.java index 17700a5ee..be493aa1f 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DblibConfigurationException.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DblibConfigurationException.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; public class DblibConfigurationException extends Exception { diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/NoAvailableConnectionsException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/NoAvailableConnectionsException.java index 16895b4d5..a39e5c5b4 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/NoAvailableConnectionsException.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/NoAvailableConnectionsException.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.sql.SQLException; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/TerminatingCachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/TerminatingCachedDataSource.java index 234bbed0c..127e6d376 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/TerminatingCachedDataSource.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/TerminatingCachedDataSource.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,13 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib; +package org.onap.ccsdk.sli.core.dblib; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger; -import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitorObserver; +import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration; +import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitorObserver; public class TerminatingCachedDataSource extends CachedDataSource implements SQLExecutionMonitorObserver { diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/BaseDBConfiguration.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java index 976b1cf2d..4b738d426 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/BaseDBConfiguration.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,25 +18,25 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.config; +package org.onap.ccsdk.sli.core.dblib.config; import java.util.Properties; public abstract class BaseDBConfiguration { - public static final String DATABASE_TYPE = "org.openecomp.sdnc.sli.dbtype"; - public static final String DATABASE_URL = "org.openecomp.sdnc.sli.jdbc.url"; - public static final String DATABASE_NAME = "org.openecomp.sdnc.sli.jdbc.database"; - public static final String CONNECTION_NAME = "org.openecomp.sdnc.sli.jdbc.connection.name"; - public static final String DATABASE_USER = "org.openecomp.sdnc.sli.jdbc.user"; - public static final String DATABASE_PSSWD = "org.openecomp.sdnc.sli.jdbc.password"; - public static final String CONNECTION_TIMEOUT="org.openecomp.sdnc.sli.jdbc.connection.timeout"; - public static final String REQUEST_TIMEOUT = "org.openecomp.sdnc.sli.jdbc.request.timeout"; - public static final String MIN_LIMIT = "org.openecomp.sdnc.sli.jdbc.limit.min"; - public static final String MAX_LIMIT = "org.openecomp.sdnc.sli.jdbc.limit.max"; - public static final String INIT_LIMIT = "org.openecomp.sdnc.sli.jdbc.limit.init"; - public static final String DATABASE_HOSTS = "org.openecomp.sdnc.sli.jdbc.hosts"; - - + public static final String DATABASE_TYPE = "org.onap.ccsdk.sli.dbtype"; + public static final String DATABASE_URL = "org.onap.ccsdk.sli.jdbc.url"; + public static final String DATABASE_NAME = "org.onap.ccsdk.sli.jdbc.database"; + public static final String CONNECTION_NAME = "org.onap.ccsdk.sli.jdbc.connection.name"; + public static final String DATABASE_USER = "org.onap.ccsdk.sli.jdbc.user"; + public static final String DATABASE_PSSWD = "org.onap.ccsdk.sli.jdbc.password"; + public static final String CONNECTION_TIMEOUT="org.onap.ccsdk.sli.jdbc.connection.timeout"; + public static final String REQUEST_TIMEOUT = "org.onap.ccsdk.sli.jdbc.request.timeout"; + public static final String MIN_LIMIT = "org.onap.ccsdk.sli.jdbc.limit.min"; + public static final String MAX_LIMIT = "org.onap.ccsdk.sli.jdbc.limit.max"; + public static final String INIT_LIMIT = "org.onap.ccsdk.sli.jdbc.limit.init"; + public static final String DATABASE_HOSTS = "org.onap.ccsdk.sli.jdbc.hosts"; + + protected final Properties props; public BaseDBConfiguration(Properties properties) { diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/DbConfigPool.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java index 117f9321d..21fdab245 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/DbConfigPool.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.config; +package org.onap.ccsdk.sli.core.dblib.config; import java.util.ArrayList; import java.util.Properties; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/JDBCConfiguration.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/JDBCConfiguration.java index cb6ea3e5c..fea103569 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/JDBCConfiguration.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/JDBCConfiguration.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.config; +package org.onap.ccsdk.sli.core.dblib.config; import java.util.Properties; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractDBResourceManagerFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractDBResourceManagerFactory.java index f4291a7dd..e88734d2e 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractDBResourceManagerFactory.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractDBResourceManagerFactory.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,9 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.factory; +package org.onap.ccsdk.sli.core.dblib.factory; -import org.openecomp.sdnc.sli.resource.dblib.jdbc.JdbcDbResourceManagerFactory; +import org.onap.ccsdk.sli.core.dblib.jdbc.JdbcDbResourceManagerFactory; /** * @version $Revision: 1.1 $ diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractResourceManagerFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractResourceManagerFactory.java index 0f58a3f03..6fc7e7a04 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractResourceManagerFactory.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractResourceManagerFactory.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,20 +18,20 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.factory; +package org.onap.ccsdk.sli.core.dblib.factory; import java.sql.SQLException; import java.util.Set; import java.util.concurrent.Callable; -import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource; -import org.openecomp.sdnc.sli.resource.dblib.CachedDataSourceFactory; -import org.openecomp.sdnc.sli.resource.dblib.DBConfigException; -import org.openecomp.sdnc.sli.resource.dblib.DBResourceManager; -import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool; -import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration; +import org.onap.ccsdk.sli.core.dblib.CachedDataSource; +import org.onap.ccsdk.sli.core.dblib.CachedDataSourceFactory; +import org.onap.ccsdk.sli.core.dblib.DBConfigException; +import org.onap.ccsdk.sli.core.dblib.DBResourceManager; +import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration; +import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool; +import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/DBConfigFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/DBConfigFactory.java index 8aadcae6b..3caa7767e 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/DBConfigFactory.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/DBConfigFactory.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,19 +18,18 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.factory; +package org.onap.ccsdk.sli.core.dblib.factory; import java.util.ArrayList; import java.util.Iterator; import java.util.Properties; +import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration; +import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool; +import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration; import org.slf4j.LoggerFactory; -import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool; -import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration; - /** * @version $Revision: 1.1 $ * Change Log diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/FactoryNotDefinedException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/FactoryNotDefinedException.java index e38cd3519..b6383a53b 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/FactoryNotDefinedException.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/FactoryNotDefinedException.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.factory; +package org.onap.ccsdk.sli.core.dblib.factory; /** diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDBCachedDataSource.java index 90c76f637..c024d0021 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDBCachedDataSource.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.jdbc; +package org.onap.ccsdk.sli.core.dblib.jdbc; import java.sql.Connection; import java.sql.PreparedStatement; @@ -27,13 +27,13 @@ import java.sql.SQLFeatureNotSupportedException; import org.apache.tomcat.jdbc.pool.DataSource; import org.apache.tomcat.jdbc.pool.PoolProperties; +import org.onap.ccsdk.sli.core.dblib.CachedDataSource; +import org.onap.ccsdk.sli.core.dblib.DBConfigException; +import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration; +import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource; -import org.openecomp.sdnc.sli.resource.dblib.DBConfigException; -import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration; import com.mysql.jdbc.Driver; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDbResourceManagerFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDbResourceManagerFactory.java index 84399dfd9..978de0eb3 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDbResourceManagerFactory.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDbResourceManagerFactory.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.jdbc; +package org.onap.ccsdk.sli.core.dblib.jdbc; import java.sql.SQLException; @@ -32,13 +32,13 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.FutureTask; -import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource; -import org.openecomp.sdnc.sli.resource.dblib.CachedDataSourceFactory; -import org.openecomp.sdnc.sli.resource.dblib.DBResourceManager; -import org.openecomp.sdnc.sli.resource.dblib.DataSourceComparator; -import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool; -import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.factory.AbstractResourceManagerFactory; +import org.onap.ccsdk.sli.core.dblib.CachedDataSource; +import org.onap.ccsdk.sli.core.dblib.CachedDataSourceFactory; +import org.onap.ccsdk.sli.core.dblib.DBResourceManager; +import org.onap.ccsdk.sli.core.dblib.DataSourceComparator; +import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool; +import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration; +import org.onap.ccsdk.sli.core.dblib.factory.AbstractResourceManagerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/MySQLCachedDataSource.java index a5482d084..407209850 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/MySQLCachedDataSource.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,15 +18,15 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.jdbc; +package org.onap.ccsdk.sli.core.dblib.jdbc; import java.sql.SQLFeatureNotSupportedException; import java.util.Properties; -import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource; -import org.openecomp.sdnc.sli.resource.dblib.DBConfigException; -import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration; -import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration; +import org.onap.ccsdk.sli.core.dblib.CachedDataSource; +import org.onap.ccsdk.sli.core.dblib.DBConfigException; +import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration; +import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/PollingWorker.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java index de87fa7e8..b670a832d 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/PollingWorker.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.pm; +package org.onap.ccsdk.sli.core.dblib.pm; import java.util.Iterator; import java.util.Properties; @@ -34,9 +34,9 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.atomic.AtomicLong; public class PollingWorker implements Runnable { - + private Logger LOGGER = LoggerFactory.getLogger(PollingWorker.class); - + private static PollingWorker self = null; private LinkedBlockingQueue tasks = new LinkedBlockingQueue(100); @@ -53,25 +53,25 @@ public class PollingWorker implements Runnable { temp.register(new TestSample(starttime)); } } - + public static void createInistance(Properties props){ self = new PollingWorker(props); } private PollingWorker(Properties ctxprops){ - if(ctxprops==null || ctxprops.getProperty("org.openecomp.sdnc.dblib.pm") == null){ + if(ctxprops==null || ctxprops.getProperty("org.onap.ccsdk.dblib.pm") == null){ enabled = false; } else { - if("true".equalsIgnoreCase((String)ctxprops.getProperty("org.openecomp.sdnc.dblib.pm"))){ + if("true".equalsIgnoreCase((String)ctxprops.getProperty("org.onap.ccsdk.dblib.pm"))){ enabled = true; } else { enabled = false; } } - interval = Long.parseLong(( ctxprops == null || ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.interval") == null) ? "60" : (String)ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.interval")); + interval = Long.parseLong(( ctxprops == null || ctxprops.getProperty("org.onap.ccsdk.dblib.pm.interval") == null) ? "60" : (String)ctxprops.getProperty("org.onap.ccsdk.dblib.pm.interval")); // '0' bucket is to count exceptions - String sampling[] = ((ctxprops == null || ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.sampling")==null) ? "0,2,5,10,20,50,100" : (String)ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.sampling")).split(","); + String sampling[] = ((ctxprops == null || ctxprops.getProperty("org.onap.ccsdk.dblib.pm.sampling")==null) ? "0,2,5,10,20,50,100" : (String)ctxprops.getProperty("org.onap.ccsdk.dblib.pm.sampling")).split(","); if(enabled){ bucketUnit = new int[sampling.length]; @@ -89,7 +89,7 @@ public class PollingWorker implements Runnable { timer.schedule(new MyTimerTask(), interval*1000L, interval*1000L); } } - + private void register(TestSample object){ try { tasks.add(object); @@ -101,7 +101,7 @@ public class PollingWorker implements Runnable { private void deRegister(TestSample object){ tasks.remove(object); } - + public void run() { for(;;){ Set data = new TreeSet(); @@ -147,14 +147,14 @@ public class PollingWorker implements Runnable { } LOGGER.info(sb.toString()); } - + class MyTimerTask extends TimerTask{ public void run() { - + clearReqister(); } - + } private void consume(TestSample probe) { @@ -163,9 +163,9 @@ public class PollingWorker implements Runnable { counters[getBucket(probe.getDuration())].incrementAndGet(); } } - + /* - * This method is used to find the offset of the bucket in + * This method is used to find the offset of the bucket in * counters. 'counters' array is 1 size longer than bucketUnit, * hence by default it returns 'bucketUnit.length' */ @@ -177,7 +177,7 @@ public class PollingWorker implements Runnable { } return bucketUnit.length; } - + private static boolean isEnabled() { return enabled; } @@ -188,17 +188,17 @@ public class PollingWorker implements Runnable { static class TestSample implements Comparable{ private long starttime; private long endtime; - + public TestSample(long starttime) { this.endtime = System.currentTimeMillis(); this.starttime = starttime; } - + public long getDuration(){ return endtime - starttime; } - public int compareTo(Object o) { + public int compareTo(Object o) { if(o instanceof TestSample){ TestSample x = (TestSample)o; if(starttime < x.starttime) diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitor.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitor.java index c58c9db7d..bcd4360e4 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitor.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitor.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.pm; +package org.onap.ccsdk.sli.core.dblib.pm; import java.io.Serializable; import java.util.Arrays; @@ -31,7 +31,7 @@ import java.util.TimerTask; import java.util.TreeSet; import java.util.concurrent.atomic.AtomicLong; -import org.openecomp.sdnc.sli.resource.dblib.DBResourceObserver; +import org.onap.ccsdk.sli.core.dblib.DBResourceObserver; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitorObserver.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitorObserver.java index 1f329750b..c17696a80 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitorObserver.java +++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitorObserver.java @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * openecomp + * onap * ================================================================================ - * Copyright (C) 2016 - 2017 AT&T + * Copyright (C) 2016 - 2017 ONAP * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.sli.resource.dblib.pm; +package org.onap.ccsdk.sli.core.dblib.pm; public interface SQLExecutionMonitorObserver { public String getDbConnectionName(); diff --git a/dblib/provider/src/main/resources/dblib.properties b/dblib/provider/src/main/resources/dblib.properties index ac295c78d..3e62308fc 100755 --- a/dblib/provider/src/main/resources/dblib.properties +++ b/dblib/provider/src/main/resources/dblib.properties @@ -1,13 +1,13 @@ -org.openecomp.sdnc.sli.dbtype=jdbc -org.openecomp.sdnc.sli.jdbc.hosts=sdnctldb01,sdnctldb02 -org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://DBHOST:3306/sdnctl -org.openecomp.sdnc.sli.jdbc.database=sdnctl -org.openecomp.sdnc.sli.jdbc.user={user for sdnctl} -org.openecomp.sdnc.sli.jdbc.password={password for sdnctl} -org.openecomp.sdnc.sli.jdbc.connection.name=sdnctldb01 +org.onap.ccsdk.sli.dbtype=jdbc +org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01,sdnctldb02 +org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://DBHOST:3306/sdnctl +org.onap.ccsdk.sli.jdbc.database=sdnctl +org.onap.ccsdk.sli.jdbc.user={user for sdnctl} +org.onap.ccsdk.sli.jdbc.password={password for sdnctl} +org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01 -org.openecomp.sdnc.sli.jdbc.connection.timeout=50 -org.openecomp.sdnc.sli.jdbc.request.timeout=100 -org.openecomp.sdnc.sli.jdbc.limit.init=10 -org.openecomp.sdnc.sli.jdbc.limit.min=10 -org.openecomp.sdnc.sli.jdbc.limit.max=20 +org.onap.ccsdk.sli.jdbc.connection.timeout=50 +org.onap.ccsdk.sli.jdbc.request.timeout=100 +org.onap.ccsdk.sli.jdbc.limit.init=10 +org.onap.ccsdk.sli.jdbc.limit.min=10 +org.onap.ccsdk.sli.jdbc.limit.max=20 |