summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-netconf-adapter
diff options
context:
space:
mode:
Diffstat (limited to 'appc-adapters/appc-netconf-adapter')
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java21
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java2
2 files changed, 7 insertions, 16 deletions
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java
index bae220d13..70438d7da 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java
@@ -43,13 +43,6 @@ public class AppcNetconfAdapterActivator implements BundleActivator {
private ServiceRegistration reporterRegistration = null;
private ServiceRegistration factoryRegistration = null;
private ServiceRegistration dbRegistration = null;
-
- /**
- * The reference to the actual implementation object that implements the services
- */
- private NetconfClientFactory clientFactory;
- private NetconfDataAccessService DAService;
-
/**
* The logger to be used
*/
@@ -73,24 +66,22 @@ public class AppcNetconfAdapterActivator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
if (registration == null) {
- clientFactory = new NetconfClientFactory();
+ /*
+ * The reference to the actual implementation object that implements the services
+ */
+ NetconfClientFactory clientFactory = new NetconfClientFactory();
factoryRegistration = context.registerService(NetconfClientFactory.class, clientFactory, null);
-
- DAService = new NetconfDataAccessServiceImpl();
+ NetconfDataAccessService DAService = new NetconfDataAccessServiceImpl();
//set dblib service
DbLibService dblibSvc = null;
ServiceReference sref = context.getServiceReference(DbLibService.class.getName());
- try{
dblibSvc = (DbLibService)context.getService(sref);
- }catch(Exception e){
- logger.error(e.getMessage());
- }
DAService.setDbLibService(dblibSvc);
///////////////////////////////////
factoryRegistration = context.registerService(NetconfDataAccessService.class, DAService, null);
}
- logger.info(Msg.COMPONENT_INITIALIZED, "NETCONF adapter");
+ //logger.info(Msg.COMPONENT_INITIALIZED, "NETCONF adapter");
}
/**
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java
index f3cca8597..6ed181d1d 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java
@@ -39,7 +39,7 @@ import java.util.ArrayList;
public class NetconfDataAccessServiceImpl implements NetconfDataAccessService {
- private static EELFLogger logger = EELFManager.getInstance().getLogger(NetconfDataAccessServiceImpl.class);
+ private final EELFLogger logger = EELFManager.getInstance().getLogger(NetconfDataAccessServiceImpl.class);
public void setSchema(String schema) {
this.schema = schema;