osgi/bugzilla-archive

Native Promise Support for JAX-RS Resources

bjhargrave opened this issue · 1 comments

Original bug ID: BZ#3087
From: @timothyjward
Reported version: R7

Comment author: @timothyjward

The JAX-RS 2.1 specification added support for "Reactive" types such as the CompletableFuture. The JAX-RS Whiteboard specification uses this pluggable support to add Promises as a reactive type in the JAX-RS client, but overlooked the support for Promises as a native return type from resource methods.

The next specification update should require Promises to have the same level of support as CompletableFuture/CompletionStage when returned from resource methods.