Upgrade RESTEasy from 3.x to 4.x
Overview
The RESTEasy project has made some structural changes and been updated to remove some old deprecated types which are now part of the Jakarta EE RESTful Web Services specification. This upgrade also includes better support for Java 17. It will also be the future for the Jakarta EE 9+ specifications.
Issue Metadata
Issue
Related Issues
Dev Contacts
QE Contacts
TBD
Testing By
-
Engineering
-
QE
Affected Projects or Components
Any project that uses REST API’s or endpoints.
Other Interested Projects
Relevant Installation Types
-
Traditional standalone server (unzipped or provisioned by Galleon)
-
Managed domain
-
OpenShift s2i
-
Bootable jar
Requirements
Hard Requirements
-
Deprecate the
org.jboss.resteasy.resteasy-jaxrs
module-
This will be replaced by the following modules:
-
org.jboss.resteasy.resteasy-client
-
org.jboss.resteasy.resteasy-client-api
-
org.jboss.resteasy.resteasy-core
-
org.jboss.resteasy.resteasy-core-spi
-
-
-
Remove the
org.jboss.resteasy.resteasy-jettison-provider
module -
Remove the
org.jboss.resteasy.resteasy-yaml-provider
module -
The
StringConverter
will be removed in favor of theParamConverter
-
The RESTEasy async response will be removed and replaced with the async response from the specification.
-
The GZIP interceptors have changed package names.
-
The workaround for this will be to simply set the
resteasy.allowGzip
property totrue
-
The migration step will be to change the package from
org.jboss.resteasy.plugins.interceptors.encoding
toorg.jboss.resteasy.plugins.interceptors
-
-
Migration rules will need to be written.
Nice-to-Have Requirements
Non-Requirements
Test Plan
There are currently no plans to update the current testing except any changes needed for removing removed code. The current tests should be enough to ensure backwards compatibility.
Community Documentation
Community documentation will need to be updated to list the removed functionality.
Release Note Content
RESTEasy has been upgraded in WildFly from the legacy 3.x to 4.x. If you’re using the Jakarta RESTful Web Services API you should not see any differences. However, if you use API’s specific to RESTEasy these may have changed.
The module org.jboss.resteasy.resteasy-jaxrs
has been deprecated and replaced by org.jboss.resteasy.resteasy-client-api
and org.jboss.resteasy.resteasy-core-spi
.
The org.jboss.resteasy.resteasy-jettison-provider
and org.jboss.resteasy.resteasy-yaml-provider
have been removed.
Jettison can be replaced either by the JSON-P/JSON-B provider or the Jackson 2 provider. There is currently no
replacement for a YAML provider.
Some examples are:
-
@Suspend
andorg.jboss.resteasy.spi.AsynchronousResponse
have been removed and replaced by Jakarta REST annotations. -
StringConverter
replaced withParamConverter
-
org.jboss.resteasy.core.ResourceInvoker
moved toorg.jboss.resteasy.spi.ResourceInvoker
-
GZIP interceptors have changed packages,
org.jboss.resteasy.plugins.interceptors.encoding
→org.jboss.resteasy.plugins.interceptors
-
The workaround is to set the
resteasy.allowGzip
parameter totrue
.
-
The following features have been added to 4.x:
-
RESTEASY-1418: RESTEasy should be able to provide trace information about request
-
RESTEASY-1905: Asynch injection
-
RESTEASY-1996: Provide builtin ParamConverter* classes for multi valued params
-
RESTEASY-2175: MediaType to/from String cache
-
RESTEASY-2265: Statistics of REST endpoints
-
RESTEASY-2364: Add support for remote ip/address without requiring HttpServletRequest
-
RESTEASY-2506: Server-side async IO support
-
RESTEASY-2597: Allow prevention of automatic http request retries
-
RESTEASY-2776: Add support of Optional types in BeanParams
-
RESTEASY-754: Port resteasy-multipart-provider to a recent mime4j version