Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a ClientBuilder service already prepared with json #56

Closed
wants to merge 4 commits into from

Conversation

rotty3000
Copy link
Contributor

No description provided.

… set

Signed-off-by: Raymond Augé <raymond.auge@liferay.com>
Signed-off-by: Raymond Augé <raymond.auge@liferay.com>
Signed-off-by: Raymond Augé <raymond.auge@liferay.com>
Signed-off-by: Raymond Augé <raymond.auge@liferay.com>
Copy link
Contributor

@rmannibucau rmannibucau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ray

I have some doubts about creating a full stack modules, why not doing that in jaxrs as the spec explains?

@@ -101,6 +101,11 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jsonb_1.0_spec</artifactId>
</dependency>
<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks wrong to have jsonb and jaxrs modules at once
They are typically never used together

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geronimo-metrics uses JSON-B
geronimo-jwt-auth uses JSON-P
are we not supposed to use those together?

Secondly, these are just services, if you don't want to use them in the same app, don't! But having a single module makes using this on OSGi easier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jsonp comes with jsonb so all good without jaxrs - if not we must fix it in jsonb module.
Also note jaxrs module is about johnzon mapper jaxrs integration, not anything else, and is pre-jsonb time.

Issue is not if they are used but their transitivity.
If you make the scope provided then it would be ok but will require tests ensjring it stays provided in the long term.

Hope it makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm confused by the code in johnzon-jsonb module: https://github.com/apache/johnzon/blob/master/johnzon-jsonb/src/main/java/org/apache/johnzon/jaxrs/jsonb/jaxrs/JsonbJaxrsProvider.java#L262

That does not appear to support jsonp. It explicitly rejects it. Is this a bug?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We originally didnt support jsonp in jsonb, we added it after and jaxrs support hasnt been update to tell the story

highest(serviceReferences(ClientBuilder.class)).flatMap(OSGi::prototypes).map(
serviceObjects -> new JsonClientBuilderFactory(context, serviceObjects)
).flatMap(
factory -> register(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks wrong in a json layer to register a jaxrs component, should stay in jaxrs whiteboard which should pull providers as per jaxrs spec imho, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @rmannibucau I sent the wrong branch in this PR. let's not get ahead of ourselves just yet. :) I will close this and send it in the order I intended.

@rotty3000 rotty3000 closed this Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants