2. HEAD /Jersey
• Open source production quality Reference
Implementation
> https://jersey.dev.java.net/
> http://wikis.sun.com/display/Jersey/Main
• 1.0.1 in December, 1.0.2 in February
GET started
>
GET the JAX-RS overview guide
>
GET the dependencies
>
GET the samples
>
• Blogs: Paul, Marc, Jakub, Aquarium
Sun Confidential: Internal Only 2
5. GET /Samples
• Many samples are provided with the release
> Atom, JAXB, JSON, Scala, Spring, WADL, …
> Using GlassFish (+embedded) and Grizzly
• Download the 1.0.1 samples zip
> Samples are maven-based
> Works with NetBeans 6.x + maven plugin
> Individual sample zip file are also available
– e.g. Sparklines, Mandel
Sun Confidential: Internal Only 5
6. GET /Involved
• Ask/answer questions, propose fixes/features
> mailto:users@jersey.dev.java.net
http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users
Sun Confidential: Internal Only 6
7. GET /Jersey-1.0.1/Client API
The API
•
Easier than HttpURLConnection!
•
Reuses JAX-RS API
•
Many samples contain tests using this API
•
White paper will be available soon for registered
•
users
Sun Confidential: Internal Only 7
8. GET /Jersey-1.0.1/Spring API
• The API and Sample
> Spring 2.0.x or 2.5.x
• XML configuration or Auto-wiring
• An instance of resource class or a provider class can
be a Spring bean (AOP-proxied or not)
> No explicit Jersey-based registration required
• Singleton, “prototype”, per-request or per-session
scopes are supported
Sun Confidential: Internal Only 8
9. GET /Jersey-1.0.1/JAXB with JAXB
• The API and Sample
• Better more “natural” JSON documents than using
mapped or badgerfish convention
• A resource method can return XML or JSON:
@GET
@Produces({“application/xml”, “application/json”})
public Bean get() {
Bean b = …
return b
}
Sun Confidential: Internal Only 9
10. GET /Jersey-1.0.1/MIME multipart
• The API
• Readers and writers for processing MIME multipart
messages
> multipart/mixed
> multipart/form-data
• Body parts reuse JAX-RS/Jersey readers/writers
> JAXB could be used (XML or JSON)
Sun Confidential: Internal Only 10
11. GET /Jersey-1.0.next
Jersey client API using Apache HTTP client
•
Atom support using Apache Abdera
•
Improved JAXB support with JSON
•
Resource specific request/response filters
•
• Guice 2.0 integration, when released!
• WebDAV support
• Comet support with Atmosphere
Sun Confidential: Internal Only 11