Thursday Nov 21, 2013

Jersey 2.x Tracing support

"Rest is the sweet sauce of labor." (Plutarch – a long time ago!)

Jersey is JAX-RS 2.0 Reference Implementation and as such it's fully compliant to JSR 339. The Jersey Team goes beyond the specification by adding features and functionalities to their JAX-RS implementation. Overtime, some of those features might be good candidates for standardization.  The Client API is a good example of that. In JAX-RS 1.x, Jersey and some other implementations has their own proprietary Client API. In JAX-RS 2.0, the Client API has been standardized and is now part of the specification. So it is not uncommon to have, in an implementation, features that are (not yet?) part of the specification. Those extra capabilities are also a way for an implementation to differentiate itself from the other implementations.

Tracing is a feature that was available in Jersey 1.x, this feature has now been ported to Jersey 2.x (2.3 and above). The Jersey Tracing capabilities allows to easily diagnose server-side request processing pipelines.  Libor Kramoliš, a member of the Jersey Team, has written a detailed post on how to use the Jersey's Tracing capability.

Friday Jul 06, 2012

Jersey 2 Integrated in GlassFish 4

JAX-RS 2.0 has released Early Draft 3 and Jersey 2 (the implementation of JAX-RS 2.0) released Milestone 5.

Jakub reported that this milestone is now integrated in GlassFish 4 builds. The first integration has basic functionality working and leaves EJB, CDI, and Validation for the coming months.

Jersey 2.0 in GlassFish 4

TOTD #182 explains how to get started with creating a simple Maven-based application, deploying on GlassFish 4, and using the newly introduced Client API to test the REST endpoint.

GlassFish 4 contains Jersey 2 as the JAX-RS implementation. If you want to use Jersey 1.1 functionality, then Martin's blog provide more details on that. All JAX-RS 1.x functionality will be supported using standard APIs anyway. This workaround is only required if Jersey 1.x functionality needs to be accessed.

Here are some pointers to follow

Provide feedback on Jersey 2 to users@jersey.java.net and JAX-RS specification to users@jax-rs-spec.java.net.