users@jsonb-spec.java.net

[jsonb-spec users] [jsr367-experts] Re: Re: [1-RuntimeAPI] Proposal

From: Inderjeet Singh <inder_at_alumni.stanford.edu>
Date: Thu, 5 Feb 2015 09:33:35 -0800

Some high-level points:

1. How about replacing Jsonb with Json everywhere in the API? Json is
shorter and easier to understand. "b" doesn't necessarily make sense from a
developer's perspective.

2. JsonBuilder.create() and newBuilder() methods seem unnecessary to me.
new JsonBuilder() has much less conceptual weight as everyone understand
what "new" does.

3. I think we should get rid of Providers. They don't add any value from a
developer's perspective. If you really want it, add an SPI.



On Mon, Feb 2, 2015 at 8:50 AM, Martin Grebac <martin.grebac_at_oracle.com>
wrote:

> On 02.02.15 8:37, Przemyslaw Bielicki wrote:
>
>> Last comment on ServiceLoader. I'm not a big fan of it and it seems I'm
>> not alone: http://stackoverflow.com/questions/7039467/java-
>> serviceloader-with-multiple-classloaders. I already had many issues with
>> it in production using JAX-WS. I had to extend a bit CXF provider with
>> custom behavior, which was the easiest part. The problem appeared when I
>> wanted my provider to be picked up by app server. If you have in you
>> classpath more than one service provider it's the classloader who decides
>> which one will be used - not you. And it might differ from one OS to
>> another (e.g. because of case sensitive JAR paths). It was a big pain and
>> when you use ServiceLoader you cannot really explicitly say which provider
>> you want to use - which is a showstopper for me.
>>
> In the proposal there's a call for provider(String providerName) with an
> explicit provider string. Would that solve the problem?
> MartiNG
>
>