RESTEasy or Jersey?

Tioma picture Tioma · Feb 18, 2011 · Viewed 68.2k times · Source

I have a requirement for RESTFul webservices. It is up to my team to decide whether to go with Jersey or Restlet or RESTEasy or anything else. after omitting other frameworks, we are not able to choose between RESTEasy and Jersey.

Since both of them seem to be almost the same, what should we consider?

The client API should be simple and rich. We are already using JBoss 5.1 in production.

Please let me know the pros and cons of Jersey and RESTEasy. Except that it is from JBoss, I'm not able to find any valid point over Jersey.

Answer

Russ Jackson picture Russ Jackson · Jan 1, 2014

One nice value-add feature of Jersey is the Jersey Test Framework which lets you run and test your Jersey REST services inside JUnit, without the need to first deploy them to a stand-alone server and even before you commit your code to your repo.

These tests are easy to write, you can run them before you even check in your Jersey web service code to make sure your service is working, and they become part of your automated test suite which helps enforce the contract your services have with your clients.

See this article for more information if you're using Jersety 1.X or this one for 2.x.

Another nice feature is support for the REST MVC pattern, which would allow you to return a View from your Jersey services rather than just data (the Model). Compatibility with the Jersey Test Framework is still maturing in this regard, but it is workable.

See this article for more information on that:

http://usna86-techbits.blogspot.com/2013/12/jersey-jerseytest-migration-from-1x-to.html