Open hantsy opened 2 years ago
This sounds more like a request on the Specification project. Jakarta REST 4.0 plans to use CDI as the injection framework, which will cause a change in the resource method signatures. Using @Asynchronous
sounds like something that could be used.
On the other hand, concurrency is not part of Jakarta EE core-profile, unlike the Jakarta REST, so the Jakarta REST can hardly be depending on it. Perhaps ObservesAsync could be used.
In the traditional Jaxrs2.x (Java EE7/8), there are several approaches to support async response in Jaxrs.
We can use ejb
@Asychronous
and@Suspend
AsyncResponse like this.And as planned in the future Jakarta EE specs, the EJB will be replaced with new CDI compatible replacement.
Currently, there is a new
@Asynchronous
added in the concurrency 3.0 spec. But it seems this annotation can not replace the ejb@Asynchronous
in the above case.