I'm unsure which approach I should take for an async REST API which will call another API and wait for results and respond to the original requester:
a) annotate service with @Async and use with CompletableFuture?
or
b) use WebAsyncTaks with async executor?
For now, I have a "dirty" way which simply implements Runnable on a service and then run the service in a separate thread as
MyService service = new MyService(someObject, url);
Thread t = new Thread(service);
t.start();