publishLcmEventBatchAsynchronously is not async 38/135038/4
authordanielhanrahan <daniel.hanrahan@est.tech>
Tue, 20 Jun 2023 17:19:59 +0000 (18:19 +0100)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Wed, 21 Jun 2023 11:24:13 +0000 (12:24 +0100)
commit4110a6b1d9de96b4f35cf696dc340d2419976cbb
treeca1f07db3a06454c7430c221e70913cd29fa1898
parent43e3e06f795a46c392004af1acb97db3b2f2cfb6
publishLcmEventBatchAsynchronously is not async

Spring @Async has a limitation where calling the async method from
within the same class won't work, as the method needs to be proxied,
and calling from the same class bypasses the proxy and calls the
underlying method directly, thus running synchronously.

Issue-ID: CPS-1749
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I7f198487dc18b359654dc38b5cf8fd600d33e189
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandler.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerAsyncHelper.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImpl.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImplSpec.groovy