Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

A Fresh New Jersey

DZone's Guide to

A Fresh New Jersey

· Java Zone
Free Resource

Managing a MongoDB deployment? Take a load off and live migrate to MongoDB Atlas, the official automated service, with little to no downtime.

Version 1.3 of Jersey, the reference implementation for JAX-RS, is out today.  This Oracle RI facilitates the generation of RESTful web services for technologies like Teracotta's Ehcache Server, GlassFish v3, and Apache Camel.  Jersey 1.3 implements the JAX-RS 1.1 specification.

JAX-RS 1.1 aligns Jersey with the new features of Java EE 6.  This spec update most notably provides annotation based REST support.  Jersey 1.3 now only works with Java SE 6 or greater.  This simplifies the build and deployment infrastructure.  

Some fixes in Jersey 1.3 include compilation issues when you develop on Java SE6 and compile to SE5.  The project has finally implemented a fix so that dependency related errors will happen during deployment.  Paul Sandoz, a Jersey project developer, said "After seeing too many developers place asserts in JAX-RS/Jersey code to check that injection was working, I simply could not stand by any longer."

Jersey's Test Framework adds support in 1.3 for setting servlet and concurrent filter(s) with a possibility to set up filter name and init parameters per filter.  

Guice integration now allows singleton-based classes to be injected via the @Inject semantics.  However, Guice's restriction in binding doesn't allow the Jersey  integration to support @*Params in the same way.    Sandoz says he prefers modules over CDI for such extensions anyway.  

The GlassFish v3 integration has individual Jersey modules instead of one big JAR.  This allows better modularization and alignment with non-GlassFish environments.  Jersey 1.3 however, has not been integrated into the latest milestone of GlassFish (M2) because the project developers experienced glitches with the OSGi integration, which broke the RESTful admin service.  They are working on a fix for the next release.

Speaking of next release, there are already some clear plans for Jersey 1.4.  They're continuously improving their OSGi integration while they manage four platforms!  (Non-OSGI, pure OSGI (tested on Felix), GlassFish OSGi, and Web/WAR deployment.)  There is also experimental support for JRebel.  Jersey is consistently being updated for Atmosphere, which should have high-level integration with WebSockets in version 0.7.

Perhaps the biggest focus in Jersey 1.4 will be enhancing the CDI integration.  This will allow JAX-RS artifacts like UriInfo and @QueryParam to work with @Inject.  Sandoz prefers Guice over CDI, but since CDI is a part of JEE 6, they "must make Jersey work well with CDI."

You can download Jersey 1.3 at the project's home page.

MongoDB Atlas is the easiest way to run the fastest-growing database for modern applications — no installation, setup, or configuration required. Easily live migrate an existing workload or start with 512MB of storage for free.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}