views:

3617

answers:

6
+10  Q: 

JAX-RS Frameworks

I've been doing some work with the JAX-RS reference implementation (Jersey). I know of at least two other frameworks (Restlet & Apache CXF).

My question is: Has anyone did some comparison between those frameworks and if so, which framework do you recommend and why?

+3  A: 

My colleague mentions why we are using RESTeasy for our current project in RESTful web services in Java EE with RESTeasy (JAX-RS):

Its reference implementation, Jersey, was not chosen because we had trouble integrating it well with EJB3 and Seam 2.0.

We are using the RESTeasy implementation of JAX-RS, because we had no trouble integrating it with our EJBs and Seam. It also has sufficient documentation.

There is another implementation from Apache, but I haven’t tried it because it uses an older version of JAX-RS.

Finally there is yet another framework for RESTful web services for Java called Restlet but we did not favour it because at the time of this writing, it is using a custom architecture, even though proper JAX-RS support is in the works.

Peter Hilton
Apache CXF (http://cxf.apache.org) has JAX-RS but there is also an Apache Incubator project that is JAX-RS compliant called Apache Wink (http://incubator.apache.org/wink/) which unlike CXF is focused just on JAX-RS.
Sam Merrell
Thanks for pointing out Wink.
Luke
+5  A: 

FWIW we're using Jersey as its packed full of features (e.g. WADL, implicit views, XML/JSON/Atom support) has a large and vibrant developer community behind it and has great spring integration.

If you use JBoss/SEAM you might find RESTeasy integrates a little better - but if you use Spring for Dependency Injection then Jersey seems the easiest, most popular, active and functional implementation.

James Strachan
+6  A: 

My team and I use Restlet extensively, but not its JAX-RS features. I can tell you that I've been very impressed with the Restlet developers and community; they're very active, engaged, responsive, and committed to a stable, efficient, reliable, and effective framework. I'm sorry I can't directly address your primary interest but I thought you might find my experience with Restlet valuable.

Avi Flax
+3  A: 

It seems like there are 4 decent JAX-RS implementations, so you are probably ok with any of them. For what it's worth, I have found Jersey (1.0.2) really nice so far. My needs are quite modest, simple back-end service, take care of plumbing and so on. And that Jersey does quite nicely.

StaxMan
+2  A: 

Found out that Apache Wink is very easy to work with, supports JAX-RS and has many features beyond the standard.

Shimi Bandiel
+1 for wink, what I love most about this framework is the simple integration with the Spring framework
LiorH
+1  A: 

Restlet has an extensive list of extensions for Spring, WADL, XML, JSON as well and many more, including an extension for JAX-RS API.

It is also the sole framework available in four consistent editions:

  • Java SE
  • Java EE
  • Google Web Toolkit
  • Google AppEngine
  • Android

Its main benefits are:

  • fully symmetric client and server API when JAX-RS was designed for server-side processing
  • connectors for other protocols than HTTP (mapping to HTTP semantics) when JAX-RS is HTTP only
  • much broader feature scope including full URI routing control via the Restlet API (but can integrate with Servlet if needed)
  • full provision for NIO support

The JAX-RS API can be a good choice if you are restricted to JCP approved APIs (then don't use Spring or any extension of the JAX-RS projects like Jersey and RESTeasy!), but otherwise Restlet is the most mature framework (initially released in 2005) and will give you, in its 2.0 version, all the benefits of annotations combined with a powerful and extensible class-oriented framework.

For a longer list of features, please check this page.

Best regards, Jerome Louvel

Restlet ~ Founder and Lead developer ~ http://www.restlet.org

Jerome Louvel
Not that I'm totally convinced "four ... editions" is a plus point - but you go on to list five, which is a little inconsistent :)
Rob Oxspring