Ain't no REST for the wicked

JAX-RS 2.0 picks up pace – releases Draft 3, Jersey and implemented in Glassfish 4

Chris Mayer

The anticipated part of Java EE 7 is showing promising signs with the third draft released recently

The long-awaited Java API for RESTful Web Services 2.0, that will be part of the Java EE 7, is showing positive signs as it gears up for its appearance in the next enterprise version of Java.

Java EE evangelist Arun Gupta brought us right up to date with JSR 339’s development progress, revealing that a third early draft had arrived. The goal with the API is to provide a set of annotations and associated classes/interfaces that may be used with POJOs in order to expose them as Web resources, whilst being HTTP-centric.

He also revealed that Jersey 2.0, the reference implementation for JAX-RS 2.0, has reached Milestone 5, a big step for the team after starting afresh with a new codebase pretty much. The even better news was that Jersey 2 had been integrated into Glassfish 4, the next iteration of Oracle’s application server. With the first integration containing basic functionality working, this leaves the three main areas of EJB, CDI, and Validation for the coming months. He also provided a handy guide to getting started with it all. A simple resource class is shown below:

public class MoviesResource {
 public List<Movie> getMovies() {
 List<Movie> movies = new ArrayList<Movie>();
 movies.add(new Movie("Million Dollar Baby", "Hillary Swank"));
 movies.add(new Movie("Toy Story", "Buzz Light Year"));
 movies.add(new Movie("Hunger Games", "Jennifer Lawrence"));

 return movies;

Follow the pointers on the link to learn more. Either way, JAX-RS 2.0 is certainly coming towards fruition and that toil seems like time well spent for Java EE 7

Inline Feedbacks
View all comments