Skip to main content

Jersey Brings Standards into RESTful Web Services Development

Posted by editor on April 21, 2009 at 5:36 AM PDT

Late last week, Jersey Version 1.0.3 was released. Jersey is an open source implementation of JAX-RS (JSR311), a Java API for RESTful Web Services.

REST (which stands for REpresentational State Transfer) has gotten a lot of publicity in technology publications and a lot of attention from developers in recent years. Yet, what it actually means has been somewhat unclear. The term "RESTful" is often used in debates over particular implementations of APIs and the services that use them. An API will be produced and called "RESTful" by its creator, but the developer community may argue that the API "really isn't all that RESTful."

I've heard this complaint from many developers who attempted to develop applications using supposedly "RESTful" APIs that really were something else. And their complaints were sometimes directed at me, because I was the editor of the article we'd agreed they would write about this difficult-to-use, highly unRESTful API (since I was the point of contact, I took the blame!)

Hence, for me it's refreshing to see the Java process, where "RESTful" isn't just a term that means a lot of different things to different people. Rather, in the Java world, we have an actual specification (JSR311). Refreshing indeed!

So, what's new in Jersey 1.0.3? Lots of bug fixes (see the change log), and some significant enhancements:

  • Guice 2.0 integration
  • Developer defined WADL-based resource classes
  • Multipart MIME improvements to the jersey-multipart module
  • Container support for the Simple HTTP server
  • Enterprise session beans as resource classes
  • Client API listeners when producing/consuming representations
  • Plug-in Java type support for @*Param annotations
  • A sample showing how to use Jersey with HTTPs, client certificates and Grizzly.

All completed in just two months since Jersey 1.0.2 was released. I'd consider that a lot of accomplishment, based on my 30 years of software development experience.

As you now know, I've had a lot of interaction in the past with RESTful APIs and systems (along with many would-be pretenders to the term). Jersey has captured my interest, and I intend to delve into it in much greater detail in the coming months.

The latest Java Mobility Podcast is
Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.

In Java Today, alexismp posted Jersey 1.0.3 released, coming to a GlassFish Update Center near you: "Paul is announcing the release of Jersey 1.0.3, an update to the open source, production-quality JAX-RS reference implementation. You can download it today or, if you're using GlassFish, simply wait a little bit for it to appear on your GlassFish Update center (both v2 and v3). New features include Guice 2.0 integration, developer-defined WADL-based resource classes, building on Grizzly 1.9.8, integrated use of MIMEPull..."

In Java ME SDK 3 released for Java (and JavaFX) developers, Danny Coward writes about the benefits of the new Java ME SDK 3: "Yesterday, the new all-in-one Java ME SDK 3.0 was released, which folds in all you need for developing Java apps for phones, settop boxes or Blu-Ray discs into one SDK... Other than tidying up the hitherto multiplying SDKs (and including LWUIT !), there's a nice consequence for JavaFX developers too: you can use it to see where the hot spots are in your mobile app are..."

Superpat announces a milestone for the OpenSSO project in OpenSSO Hits 1000 Members: "OpenSSO reached 1000 members last week... this means that 1000 people have registered at to be able to participate in the mailing lists and forums, and to be able to file and track issues. OpenSSO is on a real upward trend right now, with a whole bunch of events over the next few weeks, at the RSA Conference, MySQL Conference, European Identity Conference and more..."

In today's Weblogs, James Gosling posted Java for FIRST Robotics Competition: "I spent the end of last week in Atlanta at the finals for the FIRST Robotics Competition. This is a competition where high school students build robots that perform some task. This year's task looked an awful lot like building a robotic basketball player. I was there partly because it's just a cool event; but mostly because we were announcing (along with the folks from FIRST and from the Robotics lab at WPI) that beginning with next years event, students could do their programming in Java..."

Giovani Salvador investigated available IDEs and found the Best IDE to teach SOA and ESB concepts: "If you were assigned to teach SOA using an IDE integrated with an ESB in way students can see how you can technically implement SOA, which IDE would you use? That's the question I did myself and start investigating which one I should use."

And Terrence Barr announces that he'll be Speaking tomorrow (4/21) at SDG in Helsinki: "I just got back from a much-needed 5-day vacation break (Italy/Lago Maggiore region). Benissimo! ... and no Internet connectivity, either ;-) Just a quick note that I will be speaking tomorrow (Tue, April 21) at the SDG (Startup Developers Gathering) in Helsinki, Finland, on JavaFX..."

This week's Poll asks "Which of the technologies highlighted at JavaOne 2009 is of greatest importance for the future of Java?" Voting will be open through Thursday. So, cast your vote!

This week's Spotlight, titled Java + You = Innovation, reminds us that JavaOne is just around the corner: "It's that time of year again. The 2009 JavaOne conference takes place at the Moscone Center in San Francisco from June 2-5 and is being sponsored by Intel (a Platinum sponsor), JBoss, and Sony Ericsson. This year's technical and Birds-of-a-Feather (BOF) sessions are organized around four topics: Rich Media Applications and Interactive Content; Mobility; Services; and Core Technologies. You can view information on all the sessions now and get a $200 discount on early bird registration until April 22."

In the Forums, tolvantolvan would like to Update web services variables dynamicly on deployment: "Hi, I have a few web services that are deployed on a testing system and on a production system. Everytime I need to deploy my code on the other system I need to manually change all the wsdl variables so that the web service client connects to the host which its being deployed on. How do I specify the variables on the glassfish server so that the wsdl variables are changing dynamic by reading the correct values from the system its being deployed on? I have a BPEL process which successfully do this by accessing the Application Variables on the sun-http-bindings component in the JBI. Can I do something similar for Web Services? ..."

zappen is exploring a problem involving Reverse DNS lookup during SSL handshake: "HI! I have run into what I believe perhaps not is a clean bug but more of erroneous design in the JSSE, or whereever the dns lookup happens. To explain a bit futher: Consider a scenario where we have a Java client who wishes to communicate with a Java server, now consider the wide use of Java software through out the world. Now consider that these two would like to communicate privately. Using some imagination and perhaps experience one can quite easily see that this scenario is in fact quite common. Now if we go through what happens during the SSL handshake between these two (note that this is for ordinary stand alone applications and not those big applications servers out there)..."

And methius asks for performance advice in Recording program - AWT.Robot or Paint/Print performance: "Hello, Since it's my first post on this forum, I'll try to avoid one of the most common pitfalls and state that: Yes, I've (intensely) searched through as many forums / sites I could find. My task: To record a steady 25fps movie, with audio of a Java Application encoded in Xvid. For the recording and encoding I am succesfully using JMF. What's the problem then? The recording of (eg. Taking snapshots of the program) is far too slow. In my current best solution I use a custom RepaintManager to only take snapshots of the "dirty" regions of the screen. But the process is too slow when I go to resolutions beyond 800x600 and the entire program becomes "dirty"..."

Current and upcoming Java

Registered users can submit event listings for the href=""> Events Page using our href="">events submission form.
All submissions go through an editorial review before being posted to the

Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of it will be
archived along with other past issues in the href=""> Archive.

Late last week, Jersey Version 1.0.3 was released. Jersey is an open source implementation of JAX-RS (JSR311)...