A Fresh New Jersey
The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!
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.