aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/service
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-30 15:54:56 +0100
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-30 16:04:03 +0100
commitfca03ea334be5eb34e919a5cc7ca8bc25d79a564 (patch)
tree6566a09b7a51ee4bf0aef3a828ba15e55d5c0166 /src/main/java/at/gv/egiz/moazs/service
parent5a28668a1db53cd5fe54b65aeaf88b241918c01b (diff)
downloadmoa-zs-fca03ea334be5eb34e919a5cc7ca8bc25d79a564.tar.gz
moa-zs-fca03ea334be5eb34e919a5cc7ca8bc25d79a564.tar.bz2
moa-zs-fca03ea334be5eb34e919a5cc7ca8bc25d79a564.zip
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#
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/service')
-rw-r--r--src/main/java/at/gv/egiz/moazs/service/MzsService.java6
1 files changed, 5 insertions, 1 deletions
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;
@@ -72,6 +73,9 @@ public class MzsService implements App2MzsPortType {
private final MzsDeliveryRequestValidator validator;
@Autowired
+ private TaskExecutor taskExecutor;
+
+ @Autowired
public MzsService(DeliveryRepository repository, Consumer<String> deliveryRequestBackend,
DeliveryRequestAugmenter augmenter, Msg2MzsConverter converter,
MsgResponseSinkHub hub, MzsDeliveryRequestValidator validator) {
@@ -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();