jump to navigation

New JSR to define a high-level REST API for Java February 14, 2007

Posted by Jerome Louvel in Java, JSR 311, Restlet General.

As the Java community is increasingly using REST to develop their Web applications, Sun Microsystems is proposing to specify a high-level REST API for Java. If accepted for development by the JCP Executive Comitee, this JSR#311 will formalize as a set of Java 5 annotations to facilitate the exposition of Java objects as REST resources.

These annotations will provide a high-level REST API that will be supported by lower-level APIs.

The JSR expert group will be led by Marc Hadley and Paul Sandoz from Sun. Marc is the author of WADL (Web Application Description Language), a RESTful alternative to WSDL. As the lead of the Restlet project, I was invited to be part of the initial expert group for this JSR. I am looking forward to work with other experts and with anyone interested to see a better support for REST in Java.

There is one related effort named JRA (Java REST Annotations) that I am aware of. That will be one source of inspiration. Personnally, I’m hoping it will promote a deeper mapping to REST, covering the following requirements:

  • Doesn”t impose any constraint on resource URIs structure.
  • Support dynamic URIs based on the URI Template draft.
  • Support all HTTP methods as well as extensions like in WebDAV.
  • Support all media types and not just XML.
  • Support multiple representations of the same resource.
  • Fully embrace the resource-oriented design paradigm.

[Update 1] Another related effort I would like to mention is Sommer, led by Henry Story, which provides a mapping (via annotations) between Java objects and RDF graphs. RDF means Resource Description Framework and is the core specification of the Semantic Web. It formally describes resources (in the REST sense), their URIs and their relationships.

[Update 2] A related thread was started in the REST discussion list.

[Update 3] More links about the announce:

[Update 4] Interesting insights from Andrew S. Townley (anterior to JSR announcement)

[Update 5] The JAX-RS extension for Restlet has been added to release 1.1 M3. See the announcement and the documentation about the extension.



1. Dan Diephouse - February 14, 2007

I’m not sure if you’re trying to say that JRA doesn’t meet all those requirements, or if that is just a general requirements list. If the former, let me provide a couple clarifications on the JRA project (which I started):
1. It uses URI templates
2. They are not specific to XML, but currently CXF (the only implementation at the moment) only supports XML. I’m hoping to change this in the near future though 🙂

With that said, I’m looking forward to what the JSR group comes up with. JRA is definitely just a start and I hope this JSR makes the need for JRA go away! I would definitely like to support this in CXF once its ready.

2. JĂ©rĂ´me Louvel - February 15, 2007

The list above is only a general (and personal) list of requirements. The expert group will have to agree on those requirements before we can appreciate how well JRA solves them. Marc Hadley, one of the spec leads, has more details on the annotations plan. See the link at the end of the post. You could also apply for an Expert Group Nomination at:

Best regards,

3. The Cave » Blog Archive » More JSR 311 - February 23, 2007

[…] More posts about the REST JSR. […]

4. Pragmatic Dictator » Blog Archive » The Simplest API Possible - February 26, 2007

[…] news is the proposal for a REST API in Java. Equally interesting is that various members of the community are asking for a simple API […]

5. JavaSPEKTRUM Blogosphäre » Blog Archiv » Blogosphäre (aus JavaSPEKTRUM 02/07) - March 6, 2007

[…] erst erfolgen sollte, nachdem sich eine Lösung (z.B. auf Open Source-Basis) bereits bewährt hat. Positives Feedback kommt dagegen von JĂ©rĂ´me Louvel, Autor des RESTlet-Frameworks — wenig verwunderlich, ist er […]

6. RaymonWazerri - April 21, 2007

I love what you’e doing!
Don’t ever change and best of luck.

Raymon W.

7. Restlet API and JSR-311 API « Noelios Consulting - April 25, 2007

[…] as underlined in this previous post, both APIs will end-up being complementary rather than competitors. To clarify the scopes of those […]

8. JSR 311 approved for development « Noelios Consulting - April 25, 2007

[…] can check a comprehensive list of posts following the initial announce on my updated blog post. There is a clear interest from the community for such an API. Some voiced concerns about the JCP […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s