Jersey is the open-source reference implementation of JSR 311, the Java API for RESTful Web Services. New features in the most recent early access release include automatic content negotiation, a service provider framework, and tutorials on getting started with RESTful development in Java.
JSR 311, the Java API for RESTful Web Services, has been under development since February of this year. The specification is developed under the https://jsr311.dev.java.net java.net project. The reference implementation for JSR 311, in turn, is being developed in the open-source Jersey project on java.net.
Both the specification and the reference implementation saw new updates last week, including several tutorials on how to write RESTful Web services with Jersey.
The JSR 311 spec so far seems to center around a Pojo-based programming model where Web resources are implemented in terms of resource classes. Spec lead Marc Hadley summarizes the latest features of Jersey in a blog post, New Jersey Features, such as:
A change to the default resource object lifecyle from singleton to per-request
Support for non-empty resource class constructors...
A new SPI for plugging-in new resource providers... allows plugging-in of custom resource class factories and is used internally to support the per-request and singleton life-cycles... A resource provider is responsible for creating instances of resource classes for the Jersey runtime to use...
Additional features in the latest release include the ability to automatically obtain the appropriate media type based on a request:
For an HTTP method that produces more than one media type automatically
select the appropriate media type according to what is acceptable. This
enables a developer to implement one method for the returning of a JAXB
bean that can be serialized as XML or JSON.