Enterprise Integration Zone is brought to you in partnership with:

Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2576 posts at DZone. You can read more from them at their website. View Full User Profile

A Fresh New Jersey

07.02.2010
| 8825 views |
  • submit to reddit
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.