By sandoz on Apr 03, 2009
There are a whole bunch of features that Jersey provides in addition to the JAX-RS API. Here are some of the main features:
A WADL can be obtained from the running service for the known resources at deployment or for each resource using OPTIONS.
Documentation can be connected with the WADL.
The WADL runtime-model can be used in conjunction with the Model View Controller pattern.
- Client API
Ease of use API for making request to HTTP-based services. Leverages artifacts of JAX-RS for producing and consuming representations as Java types.
Leverages existing HTTP client solutions like Http(S)UrlConnection or the Apache HTTP client.
- Spring integration
This is also provided by NetBeans 6.5, see the Web services example for RESTful Web services and Spring.
Stay tuned for an enterprise tech-tip on Jersey & Spring.
- Web application and resource-specific filtering
Resource-specific is how the @RolesAllowed support is implemented.
- Model view controller with supported provided for JSPs.
A resource class is a controller, which can return a Viewable that references a view and a model. The view processed the model to render a representation such as an HTML page.
Developers can plug in support for their own view technology, say for Freemarker or Velocity, by implementing a template processor.
- JSON support integrated with JAXB
Use one annotated JAXB class instances of which can be serialized to XML or JSON.
- Multipart MIME ("multipart/\*")
Makes it easier to consume "multipart/form" representations sent from browsers.
- Atom support using Apache Abdera
See also the three samples: server; client; and model.
- Embedded container support for monster a.k.a Grizzly and the light wight HTTP server (The Simple container will be available for 1.0.3)
See here for Grizzly.
Grizzly makes it really easy to test clients and services.
- Plug-in injection support
Add your own stuff to be injected. See here and here.
- Plug-in IoC-framework support
This framework is used to integrate Spring, Guice and EJB support.
- Numerous samples
See here for a zip of all the samples.
Most of these features, and many others, have corresponding documentation in the JavaDoc but we realize this is not sufficient for developers.
With that in mind we have started work on a Jersey users guide, written in DocBook. Jakub has put some nice maven-based DocBook infrastructure in place and we can deploy the users guide to the maven repo.
I have converted the JAX-RS overview, on the wiki, to be a chapter of the users guide. And, Jakub is currently working on some JSON documentation. For a preview see the PDF and the HTML zip. We will slowly build up the users guide over successive iterations/releases.
Let is know what you think. And if you are interested in helping out in this documentation effort please email the Jersey users list: firstname.lastname@example.org