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

Doc for Jakarta RESTful Web Services (JAX-RS) 3.1 (part of EE 10) #5822

Closed
jim-krueger opened this issue Sep 22, 2022 · 32 comments
Closed

Doc for Jakarta RESTful Web Services (JAX-RS) 3.1 (part of EE 10) #5822

jim-krueger opened this issue Sep 22, 2022 · 32 comments
Assignees
Labels
23.0.0.3 doc info received Jakarta EE 10 peer reviewed technical reviewed An SME reviewed and approved the documentation from a technical perspective.
Milestone

Comments

@jim-krueger
Copy link
Member

ID work is needed for Jakarta RESTful Web Services (JAX-RS) 3.1 as part of epic issue OpenLiberty/open-liberty#18739.

Primarily the Jakarta REST support for Open Liberty in EE10 will come from RESTEasy (Version 6.2.0-Final). However, there are some areas that we should expound upon.

  • Changes in Global Handler support: Issue 22598
  • Java Se Bootstrap support is new to Jakarta RESTful WS 3.1 (EE10), but it is optional and Liberty will not be supporting it: Issue 22541
  • Multipart Support: We currently support multipart via internal IBM APIs that were created for previous releases. Multipart is now part of the Jakarta RESTful WS 3.1 specification and has official APIs. For now we will continue to support both and will eventually deprecate our internal mechanism. This will need to be explained.

In addition, we will be adding information to Issue 20868 as we find migration or other issues that need also may need corresponding documentation.

Also, we will be working on a Skills Transfer Education document and demo for L2 that may also be useful for crafting the doc pages for this feature. If you have any questions or concerns, please let us know. Thanks!

@dmuelle
Copy link
Member

dmuelle commented Sep 22, 2022

Thanks @jim-krueger - w/r/t Multipart, we should review this topic-
https://openliberty.io/docs/latest/send-receive-multipart-jaxrs.html

at some point I made the following note in the epic:

as part of ID for this feature, we should update the following doc to clarify that the io.openliberty.jaxrs30 Maven/Gradle dependency is not required for multipart form/data in Resftful WS 3.1 and later

not sure if that's still accurate but wanted to make a note here

@dmuelle dmuelle added this to the 22.0.0.12 milestone Sep 22, 2022
@jim-krueger
Copy link
Member Author

jim-krueger commented Sep 23, 2022

@dmuelle Absolutely. The doc you are referring to above is our initial support. We are going to want to change this to demonstrate the "spec" way of doing this.

@jim-krueger
Copy link
Member Author

Adding separate comments for the individual potential documentation needs. We can update each comment as we go along with additional information etc..

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Multipart:

  • Updates to https://openliberty.io/docs/latest/send-receive-multipart-jaxrs.html Update: Talked with David and since the functions in this section is being deprecated and the replacement function is defined in the specification (ie. no longer Liberty-specific APIs), then this documentation is no longer needed.

  • A comment will need to be added to the "Differences between Jakarta EE 10 and 9.1" section detailing the new spec version and that we will continue to support the IBM-specific APIs for this release, but they will eventually be deprecated.

  • Add an update to the Jax-RS 3.0, 2.1 and 2.0 feature pages indicating that the multipart functionality in these versions is being deprecated in RESTful Webservices 3.1 and replaced with an official spec-defined API.

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Global Handlers:

In previous Liberty feature versions of RESTful Web Services (JAXRS) and XML Web Services (JAXWS), the Web Services Global Handler SPI package com.ibm.wsspi.webservices.handler was automatically enabled .
Starting in Jakarta EE 10, Global Handlers are disabled by default. As with previous versions, users will need to create a user feature to configure a Global Handler. However, users will now be required to add the io.openliberty.globalhandler-1.0 protected Liberty feature to their user feature's manifest file in order to enable the SPI package.

Manifest-Version: 1.0
Subsystem-Type: osgi.subsystem.feature
IBM-Feature-Version: 2
Subsystem-Version: 1.0.0
Subsystem-Content: MySimpleGlobalHandler.jakarta;version="1.0.0",
io.openliberty.globalhandler-1.0; type="osgi.subsystem.feature"
Subsystem-SymbolicName: MySimpleGlobalHandlerFeature;visibility:=public
Subsystem-ManifestVersion: 1.0
IBM-ShortName: MySimpleGlobalHandlerFeature

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Java Se Bootstrap:

This is a new (Optional API) in Jakarta Rest 3.1. Open Liberty will not be supporting this, however we will be adding a new warning message indicated that this function is not supported.
Update: Rather than a warning message, we went with throwing an UnsupportedOperationException. See https://github.com/OpenLiberty/open-liberty/pull/23004

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Mandatory usage of JSONB instance provided by user's ContextResolver:

  • Comment needed for "Differences between Jakarta EE 10 and 9.1" section.
  • Info: jakarta issue 742

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Automatic service provider registration

  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

@jim-krueger
Copy link
Member Author

Default exception mapper

  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

@jim-krueger
Copy link
Member Author

Fields and Bean Properties:

  • Array types may be specified for @CookieParam , @FormParam , @HeaderParam ,
    @MatrixParam and @QueryParam parameters.

  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

@jim-krueger
Copy link
Member Author

New method #hasProperty(String) wherever #getProperty(String) exists

  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

1 similar comment
@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

New method #hasProperty(String) wherever #getProperty(String) exists

  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Response.created(URI) now resolves relative URIs into an absolute URI against the base URI, not against the request URI anymore:

  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Declaring Media Type Capabilities:

  • Clarified resource matching when Content-Type or Accept are missing in request.
  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

@jim-krueger
Copy link
Member Author

jim-krueger commented Oct 10, 2022

Constructors of Cookie class are deprecated in favor of new Cookie.Builder class

Constructors of NewCookie are deprecated in favor of new NewCookie.Builder class

  • Likely just a "Differences between Jakarta EE 10 and 9.1" section comment.

@chirp1 chirp1 added 23.0.0.1 and removed 22.0.0.13 labels Nov 10, 2022
@dmuelle dmuelle modified the milestones: 22.0.0.13, 23.0.0.1 Nov 30, 2022
@chirp1 chirp1 added 23.0.0.2 and removed 23.0.0.1 labels Nov 30, 2022
@dmuelle dmuelle added 23.0.0.3 and removed 23.0.0.2 labels Jan 25, 2023
@dmuelle dmuelle modified the milestones: 23.0.0.2, 23.0.0.3 Jan 25, 2023
@jim-krueger
Copy link
Member Author

@dmuelle Please see the update to the Global Handlers comment above and let me know if you have any questions. Thanks

@jim-krueger
Copy link
Member Author

jim-krueger commented Jan 27, 2023

Servlet:

In previous Liberty feature versions of RESTful Web Services (JAXRS) and RESTful Web Services Client, the Servlet APIs were made available to any Open Liberty application.
Starting with Jakarta EE 10, Open Liberty applications that require Servlet APIs must additionally add the servlet-6.0 feature to their server.xml file.

@jim-krueger
Copy link
Member Author

jim-krueger commented Jan 27, 2023

Concurrency:

In previous Liberty feature versions of RESTful Web Services (JAXRS) and RESTful Web Services Client, the Concurrency APIs were made available to any Open Liberty application.
Starting with Jakarta EE 10, Open Liberty applications that require Concurrency APIs must additionally add the servlet-6.0 feature to their server.xml file.

@dmuelle
Copy link
Member

dmuelle commented Jan 30, 2023

Hi @jim-krueger - for the global handlers update, what specifically does this information show? is it the content that the user needs to add to their user feature manifest file?

Manifest-Version: 1.0
Subsystem-Type: osgi.subsystem.feature
IBM-Feature-Version: 2
Subsystem-Version: 1.0.0
Subsystem-Content: MySimpleGlobalHandler.jakarta;version="1.0.0",
io.openliberty.globalhandler-1.0; type="osgi.subsystem.feature"
Subsystem-SymbolicName: MySimpleGlobalHandlerFeature;visibility:=public
Subsystem-ManifestVersion: 1.0
IBM-ShortName: MySimpleGlobalHandlerFeature

@jim-krueger
Copy link
Member Author

jim-krueger commented Jan 30, 2023

@dmuelle - That is a sample of a manifest file for a user feature. In my example above I put in bold the only line that needs to be added to the Subsystem-Content:
io.openliberty.globalhandler-1.0; type="osgi.subsystem.feature"

If possible I think making that line bold and red would help.

dmuelle added a commit that referenced this issue Jan 30, 2023
@dmuelle
Copy link
Member

dmuelle commented Jan 30, 2023

Thanks Jim- I believe I have all these changes on draft now:

https://docs-draft-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/docs/latest/jakarta-ee10-diff.html#restfulws

If possible I think making that line bold and red would help.

We can't use red due to accessibility concerns and bold isnt showing up in the code block. But I tweaked the description to make it more obvious that is the line you need to add. Let me know if any further changes are needed. If not, you can add the technical reviewed label to this issue to sign off and the changes will publish when EE10 is Ga. Thanks

@jim-krueger
Copy link
Member Author

@dmuelle , The review looks good except for Concurrency. Here is an update for that:

When the restfulWS-3.0 and restfulWSClient-3.0 Liberty features are enabled, the Concurrency APIs are available to any Open Liberty application by default.

Starting with RESTful Web Services 3.1 and RESTful Web Services Client 3.1, the Concurrency APIs are no longer available by default. For Open Liberty applications that require Concurrency APIs, you must also add the concurrent-3.0 feature to the server.xml file.

dmuelle added a commit that referenced this issue Jan 31, 2023
@jim-krueger jim-krueger added the technical reviewed An SME reviewed and approved the documentation from a technical perspective. label Jan 31, 2023
@dmuelle
Copy link
Member

dmuelle commented Jan 31, 2023

@dmuelle
Copy link
Member

dmuelle commented Mar 8, 2023

@ramkumar-k-9286
Copy link
Contributor

Peer Review

Add io.openliberty.globalhandler-1.0; type="osgi.subsystem.feature" to your user feature manifest file, as shown in the following manifest file example:
->
Add io.openliberty.globalhandler-1.0; type="osgi.subsystem.feature" to your user feature manifest file, as shown in the following manifest file example**.**

Support for array types as parameters is added to the following field and bean property annotations:
->
Support for array types as parameters is added to the following field and bean property annotations**.**

@dmuelle
Copy link
Member

dmuelle commented Mar 9, 2023

@ramkumar-k-9286 thanks, fixed.

dmuelle added a commit that referenced this issue Mar 9, 2023
dmuelle added a commit that referenced this issue Mar 29, 2023
@dmuelle dmuelle closed this as completed Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
23.0.0.3 doc info received Jakarta EE 10 peer reviewed technical reviewed An SME reviewed and approved the documentation from a technical perspective.
Projects
None yet
Development

No branches or pull requests

4 participants