users@jax-rs-spec.java.net

[jax-rs-spec users] Re: [ANN] JAX-RS API 2.1-m06 has been released

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Thu, 13 Apr 2017 08:33:44 +0200

Hi Sergey,

the main reason is forward compatibility.

Implementations can adopt Java SE 9 and the correct way how to declare
services there is to use module-info, which we don't want to parse.
ServiceLoader does that for us. Also, there were multiple issues with
the old implementation in the API - it wasn't able process comments,
blank lines, etc, so it effectively introduced a format very similar to
what ServiceLoader can parse, but different.

The old implementation is not able to function properly on Java SE 9. To
fix that, we would need to rework the algorithm and make part of the
impl depend on Java SE 9. (Which is possible with multi-release jars,
but ServiceLoader seems like better solution).

Regards,
Pavel




On 12/04/2017 20:57, Sergey Beryozkin wrote:
> Hi Pavel
> What was the motivation for the sensitive ServiceLoader change ?
> Thanks, Sergey
> ------------------------------------------------------------------------
> *From:* Pavel Bucek <pavel.bucek_at_oracle.com>
> *Sent:* 11 April 2017 22:56:48
> *To:* jsr370-experts_at_jax-rs-spec.java.net
> *Subject:* Re: [ANN] JAX-RS API 2.1-m06 has been released
> module-info is not part of the released jar yet, it will be in the next
> release. (there was some jdk misconfiguration in the release pipeline;
> anyway, if anyone wants to test it, you can build locally with Java SE 9
> (ea)).
>
> On 11/04/2017 23:47, Pavel Bucek wrote:
>
> > Dear experts,
> >
> > JAX-RS API 2.1-m06 has been released.
> >
> > List of changes:
> >
> > - removed traces of Non-Blocking I/O API, Flow interface and
> > consequent modifications of SSE API
> > - added @PATCH and support for making patch requests on the client side
> > - ExecutorService and ScheduleExecutorService setting for the client
> > - ServiceLoader is used for discovery of RuntimeDelegate (and other
> > services)
> > - jar file contains module-info.class.
> >
> > Please let us know any comments, we'd be especially grateful for tests
> > of the runtime delegate lookup in various environments and the
> > information whether added module-info.class causes any issues.
> >
> > I noticed one potential place for improvement - after removal of
> > methods from Flow.Subscriber from SseEventSink, we haven't re-add a
> > possibility to register error and close listeners, so the only chance
> > to get the error or state is to check the returned value from
> > SseEventSink#send or call "isClosed". Is that all what is needed?
> >
> > As always, any comments are appreciated.
> >
> > Thanks and regards,
> > Pavel
> >
>