Model distribution fails with model-loader 1.13.5
[aai/model-loader.git] / src / main / java / org / onap / aai / modelloader / service / ModelController.java
index 0921982..5c784b2 100644 (file)
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 
+import javax.annotation.PostConstruct;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
@@ -71,6 +72,13 @@ public class ModelController implements ModelLoaderInterface {
         this.artifactDownloadManager = artifactDownloadManager;
     }
 
+    @PostConstruct
+    protected void start() {
+        if (!config.getASDCConnectionDisabled()) {
+            initSdcClient();
+        }
+    }
+
     /**
      * Responsible for stopping the connection to the distribution client before the resource is destroyed.
      */