This is no longer the active Jersey repository. Please see the README.md
Release date: 29-Jun-2015
Release date: 05-Jun-2015
Jersey has updated version of MOXy (XML/JSON provider) to version 2.6. Among some bug fixes there are other notable changes (some of them breaking) that you should be aware of:
Redesign of type property in JSON processing -
Special handling of JSON type
property is deprecated. If there is need to
identify type of JSON object - due to missing root element or some special inheritance
requirements, it is necessary to specify fully qualified type property with
http://www.w3.org/2001/XMLSchema-instance
namespace.
Several experimental Jersey APIs have matured enough and as such we have decided to promote them from Beta status, namely:
Jersey Reactive Client API. Also Reactive Client moved from incubator to extension (umbrella) module.
Jersey client-side ClientLifecycleListener SPI.
Jersey server-side ContainerLifecycleListener SPI.
Jersey server-side (MVC) @ErrorTemplate annotation.
Jersey test framework (client-side) LoopBackConnectorProvider connector.
Jersey test framework (server-side) ContainerRequestBuilder class.
These APIs are now part of the official public Jersey 2.x API.
Release date: 11-Mar-2015
From version 2.17 onwards, it's possible to use CDI with multiple JAX-RS web-applications packaged in EAR. All supported HK2/CDI injections now work as expected for JAX-RS application deployed in the mentioned fashion. One need to make sure that modules jersey-cdi1x and jersey-cdi1x-servlet are present in Servlet container (that supports EARs).
Release date: 11-Feb-2015
From version 2.16 onwards, all JAX-B providers are being bundled in a separate module.
We improved the performance for using sub-resource locators in an Jersey application. The performance gains
are available for cases when the sub-resource locator method returns either a resource class (return value is
e.g. Class<?>
or Class<MySubResource>
) or a (non-proxied)
resource instance (when return value is an instance of MySubResource
class).
Jetty connector and Apache connector have been previously using their own custom properties to set SSL context on a connector. These properties have been deprecated and the code has been updated to read the SSL context information from the JAX-RS client configuration. This means that all Jersey connectors now properly accept SSL configuration as configured via standard JAX-RS ClientBuilder methods.
Previously, all Jersey connectors have been using their own default chunk size when HTTP chunked coding was used. Since Jersey 2.16, there is a new default chunk size value used by all connectors, if a custom chunk size is not set. The new default value is stored under ClientProperties.DEFAULT_CHUNK_SIZE client property.
Release date: 14-Jan-2015
Before 2.15, CDI integration was supported primarily in Java EE containers with built-in CDI support. From version 2.15 onwards, it is possible to leverage CDI integration also outside of Java EE environment. A new example, helloworld-weld, has been introduced to demonstrate the new feature using Grizzly HTTP server. Another example application, cdi-webapp, has been updated so that it enables Apache Tomcat Server deployment.
CDI support improvement caused breaking changes for those users directly referring to the following CDI supporting Jersey module in maven:
<dependency> <groupId>org.glassfish.jersey.containers.glassfish</groupId> <artifactId>jersey-gf-cdi</artifactId> <version>${pre-2.15-version}</version> </dependency>
The above dependency needs to be replaced with:
<dependency> <groupId>org.glassfish.jersey.ext.cdi</groupId> <artifactId>jersey-cdi1x</artifactId> <version>2.15</version> </dependency>
The following needs to be included in addition if you want to leverage CDI JTA support:
<dependency> <groupId>org.glassfish.jersey.ext.cdi</groupId> <artifactId>jersey-cdi1x-transaction</artifactId> <version>2.15</version> </dependency>
Release date: 11-Dec-2014
Release date: 01-Jul-2014
Release date: 24-Jun-2014
Release date: 30-May-2014
Release date: 23-May-2014
Gerard updated the Declarative Linking extension module which has been ported to Jersey 2 in version 2.6. You can read more about what Declarative Linking does and what it's capable of in the following blog posts:
Our media module that supports working with JSON via Jackson library has been updated to use Jackson 2.x (2.3.2). All samples and tests have been rewritten to use Jackson 2 as well. In order to use Jackson 2 in your application you need to add jersey-media-json-jackson (+ it's Jackson dependencies) to your class-path and register JacksonFeature in your application.
We dropped automatic registration of message body providers (MessageBodyWriter, MessageBodyReader) and exception mappers via META-INF/services mechanism. This functionality can be restored by adding jersey-metainf-services module to the class-path of your application.
Note: This change may affect 3rd party libraries (e.g. Jackson 2.x) in a way their provider would not be registered in an JAX-RS app. You need to either register them manually or use mentioned jersey-metainf-services module.
Jersey Test Framework now supports TestNG to run the tests (in addition to the JUnit, which is supported by default). You can now run the tests in parallel using either JUnit or TestNG. See chapters dedicated to TestNG and parallel testing for more information: Running TestNG Tests and Parallel Testing with Jersey Test Framework.