RESTful @ Sun, putting it all together
By alexismp on juil. 25, 2007
JSR 311, Jersey, Sun Web Developer Pack (Sun WDP), GlassFish, NetBeans, how do they all relate to RESTful Web Services?
• JSR 311 is, as the name implies, the Java Specification Request for RESTfull Web Service for the Java Platform (JAX-RS). The Expert Group is chartered with creating a specification. It's not really an API (doesn't make a lot of sense for REST) but more a set of annotations for POJOs (and it's not the JAX-WS RESTful capabilities using the
Provider APIs). JSR 311 has a dedicated java.net project where you can read Specification Drafts and follow and participate in the discussions. JAX-RS is listed as a potential component of the upcoming Java EE 6 specification.
• Jersey is the reference implementation for JSR 311. It is now up to version 0.2 and can be deployed in a variety of environments: GlassFish servlet container or JAX-WS endpoint, Grizzly, Java 6 (using its lightweight web server), Tomcat, etc... Restlets is another popular implementation which should in time become JSR 311-compliant.
• The Sun Web Developer Pack is is a collection of technologies for Ajax, Scripting, ATOM, and REST-based services development. Its May R2 release featured a pre-JSR 311 RESTful API which was demoed using NetBeans at JavaOne. You can watch the demo here. While Sun WDP used to be a full install, it will now be available through the GlassFish Update Center (although for the time being, only Sun WDP R1 is available via this install mechanism)..
• GlassFish is the preferred deployment platform for the Sun WDP and Jersey.
• NetBeans 6.0 Milestone 9 (the "JavaOne 2007 milestone") has a "RESTfull Web Service from Entity Classes" wizard which is tied to the use of the aforementioned RESTful API from Sun WDP R2. This feature is no longer in Milestone 10 but the good news is that recent NetBeans 6 daily builds should soon support the JAX-RS Jersey reference implementation. As a matter of fact the JSR 311 libraries should be bundled with the IDE for better OOTB behavior and be implicitly added to a web application project as necessary.
Next Stop: NetBeans 6.0 Beta 1 (
mid-August postponed to September 17th, in sync with GlassFish v2) with an updated Jersey milestone build and probably a GlassFish v2 Release Candidate. Both JAX-RS and Jersey are set to be done by mid-2008 it seems.