Over a million developers have joined DZone.

RESTEasy 2: Now Apache v2 Licensed!

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

An all new version of JBoss' RESTEasy is finally here eight months after the 1.2 release.  After several betas, the major release of RESTEasy 2.0 is bringing RESTful Java apps and web services into the present technology landscape.  You'll find new features such as Spring 3.0 support, CDI (Contexts and Dependency Injection JSR-299) support, and asynchronous Servlet 3.0 support.  

RESTEasy is a certified, fully-portable implementation of the JAX-RS specification.  It can run in any Servlet Container (now including 3.0), and it can also achieve tighter integration with the JBoss app server.  

While JAX-RS is a server-side spec, RESTEasy brings JAX-RS to the client-side through the RESTEasy JAX-RS Client Framework.  The client-side framework lets developers map outgoing HTTP requests to remote servers using interface proxies and JAX-RS annotations.

The highlights of RESTEasy 2.0 include:

  • CDI Support
  • Spring 3.0 Support
  • TCK 1.1 Compliance
  • Async Servlet 3.0 Support
  • A new Javascript API.  A javscript servlet scans JAX-RS deployments and generates Javascript code that can be downloaded that can be used as stubs.
  • Relicensed under ASL 2.0.  We switched to be compatible with HornetQ and Drools as we're developing REST interfaces for these guys.
  • Tons of bugfixes and performance improvements reported by the community over the past 8 months.

JBoss AS 6-Milestone 4 will include deeper integration with RESTEasy 2.0 which will facilitate automatic scanning, EJB injection, CDI injection, and more.  RESTEasy will align the JAX-RS with all of the new features Java EE 6.

Here are the other major features of RESTEasy (pre 2.0):

  • Portable to any app-server/Tomcat that runs on JDK 5 or higher
  • Embeddedable server implementation for JUnit testing
  • Client framework that leverages JAX-RS annotations so that you can write HTTP clients easily (JAX-RS only defines server bindings)
  • Client "Browser" cache. Supports HTTP 1.1 caching semantics including cache revalidation
  • Server in-memory cache. Local response cache. Automatically handles ETag generation and cache revalidation
  • Rich set of providers for: XML, JSON, YAML, Fastinfoset, Multipart, XOP, Atom, etc.
  • JAXB marshalling into XML, JSON, Jackson, Fastinfoset, and Atom as well as wrappers for maps, arrays, lists, and sets of JAXB Objects.
  • GZIP content-encoding. Automatic GZIP compression/decompression suppport in client and server frameworks
  • Asynchronous HTTP (Comet) abstractions for JBoss Web, Tomcat 6, and Servlet 3.0
  • Asynchronous Job Service.
  • Rich interceptor model.
  • EJB, Seam, Guice, Spring, and Spring MVC integration

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}