Jersey 15 01 09
-
Upload
eduardo-pelegri-llopart -
Category
Technology
-
view
862 -
download
0
Transcript of Jersey 15 01 09
![Page 1: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/1.jpg)
1
Jersey, reference implementation of JAX-RS
[email protected]://blogs.sun.com/sandozSun Microsystems
1
![Page 2: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/2.jpg)
Sun Confidential: Internal Only 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
![Page 3: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/3.jpg)
Sun Confidential: Internal Only 3
GET /Glassfish/v3/Prelude
![Page 4: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/4.jpg)
Sun Confidential: Internal Only 4
GET /NetBeans/6.5
![Page 5: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/5.jpg)
Sun Confidential: Internal Only 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
![Page 6: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/6.jpg)
Sun Confidential: Internal Only 6
GET /Involved
• Ask/answer questions, propose fixes/features> mailto:[email protected]
http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users
![Page 7: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/7.jpg)
Sun Confidential: Internal Only 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
![Page 8: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/8.jpg)
Sun Confidential: Internal Only 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
![Page 9: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/9.jpg)
Sun Confidential: Internal Only 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
}
![Page 10: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/10.jpg)
Sun Confidential: Internal Only 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)
![Page 11: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/11.jpg)
Sun Confidential: Internal Only 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
![Page 12: Jersey 15 01 09](https://reader031.fdocuments.in/reader031/viewer/2022022412/58f31d7b1a28ab61688b464d/html5/thumbnails/12.jpg)
12
Jersey, reference implementation of JAX-RS
[email protected]://blogs.sun.com/sandozSun Microsystems
12