Remove service annotation for ImperativeBluePrintWorkflowService 94/110894/2
authorJozsef Csongvai <jozsef.csongvai@bell.ca>
Mon, 22 Jun 2020 21:24:39 +0000 (17:24 -0400)
committerJozsef Csongvai <jozsef.csongvai@bell.ca>
Tue, 4 Aug 2020 17:03:56 +0000 (13:03 -0400)
commit5a6330bc964c738ac8014f7cbf77b31806ee10f3
tree4951583a516065f4ed8c46ba5e27298f737a6fd9
parent104a94afd725b4d9032f9d099cdcead2d1d054dc
Remove service annotation for ImperativeBluePrintWorkflowService

Even with the PROTOTYPE_SCOPE annotation the bean was in effect
a Singleton, as it was only injected in one other service. The
class has field variables which would be shared by every thread,
potentially causing severe errors under parallel execution.

Removed annotations to disable dependency injection, and instead
create a new instance with every execution call.

Issue-ID: CCSDK-2473
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
Change-Id: I9e7148540781dcd869d55d932f4187c5f81cb3f5
ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt