From fca03ea334be5eb34e919a5cc7ca8bc25d79a564 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 30 Oct 2019 15:54:56 +0100 Subject: Remove JAXB Class Not Found Fix - Problem: Apparently I used the wrong executor when supplying the backend tasks via CompletableFuture.supplyAsync(). This method relies on ForkJoinPool.commonPool(), and threads in this pool are not configured correctly? - Solution: Use spring-boots auto-configured TaskExecutor. - More Information on this issue can be found here: https://issues.apache.org/jira/browse/CXF-8100# --- src/main/java/at/gv/egiz/moazs/service/MzsService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/gv/egiz/moazs/service') diff --git a/src/main/java/at/gv/egiz/moazs/service/MzsService.java b/src/main/java/at/gv/egiz/moazs/service/MzsService.java index d9c81f3..55f0554 100644 --- a/src/main/java/at/gv/egiz/moazs/service/MzsService.java +++ b/src/main/java/at/gv/egiz/moazs/service/MzsService.java @@ -34,6 +34,7 @@ import org.apache.cxf.annotations.SchemaValidation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.task.TaskExecutor; import org.springframework.stereotype.Service; import javax.jws.WebParam; @@ -71,6 +72,9 @@ public class MzsService implements App2MzsPortType { private final MsgResponseSinkHub hub; private final MzsDeliveryRequestValidator validator; + @Autowired + private TaskExecutor taskExecutor; + @Autowired public MzsService(DeliveryRepository repository, Consumer deliveryRequestBackend, DeliveryRequestAugmenter augmenter, Msg2MzsConverter converter, @@ -93,7 +97,7 @@ public class MzsService implements App2MzsPortType { validator.isRequestValid(completeRequest); - var requestProcessed = supplyAsync(() -> process(completeRequest)); + var requestProcessed = supplyAsync(() -> process(completeRequest), taskExecutor); try { var serviceTimeout = completeRequest.getConfig().getServiceTimeout(); -- cgit v1.2.3