|
|
|
|
(this post was stuck in the "draft" category and should have been out a few days ago, sorry about that)
|
The 0.7 version of Jersey, the JAX-RS reference implementation is out and it is a good illustration of community development. Of course it aligns with the current state of the specification but it also shows interesting work with JavaRebel, Spring and IoC's, Grizzly, Grizzly Comet, JavaRebel and has improved JSON support. Who said Reference Implementations were useless proof of concepts? |
|
More news on the Hudson Dashboard for GlassFish Builds. JAX-RS (JSR 311) and its Jersey Reference Implementation have long started agile iterative development and it only makes a lot of sense to now have them use Hudson as a continuous build system. |
In fact, the team has been using Hudson for a little while and all is accessible outside Sun:
• Jersey trunk build with findbugs
• Jersey Unit testing with Emma
If you're curious, Jersey takes about one minute to build. glassfishbuildtools.sun.com also hosts GlassFish v3 and Hudson builds.
|
Paul Sandoz is reporting on the release of JAX-RS v0.6, the JSR for RESTful Web Services. As always, the specification and Reference Implementation (Jersey) are moving along quite nicely as well as in parallel. The editors draft is available here and the schedule has been updated to have a final release in September (see also this wiki page). |
Among the new things in v0.6, you'll find the Jersey client API, enhanced JSON suport, and better integration of Jersey with IoC containers. For more details on the contents and the future developments, please read this blog entry. Keep the feedback coming - good or not so good, we take both.
|
Jersey v0.5 is now on the GlassFish Update Center, courtesy of Jakub. Get it using the |
The other news in the JAX-RS world is Paul's blog entry on the client API for Jersey. While a REST API on the server side isn't really needed, having one to write clients in Java (not JavaScript) does make a lot of sense (URLConnection, HTTPClient anyone?). This client API uses the builder pattern and allows for filters and asynchrony. This client API is work in progress and targets Jersey v0.6.
|
The latest episode of the GlassFish Podcast was briefly pushed out last week but feedburner couldn't pick up the audio enclosure. All is now fixed and live. You can get the content here or from iTunes (search for "GlassFish"). This is good timing given the recent 0.5 release of Jersey (although the interview doesn't get into specifics of that interim release) and the associated NetBeans support. The GlassFish Update Center doesn't have the Jersey 0.5 bits available just yet, but I'm told this should happen in the next few days. |
This podcast's mp3 files are now served by GlassFish and the application isn't (all) Java. Read all about it on Igor's blog.
|
• Sun and MySQL
Welcome Aboard! |
|
Paul is announcing the availability of JAX-RS v0.5. As with previous releases, this one is synchronized with Jersey v0.5, its Reference Implementation. Traditional delivery vehicles such a the GlassFish Update Center and NetBeans will soon follow (Maven should be already there). Among new things, Jersey has an improved deployment and configuration process (courtesy of Grizzly and asm) and a rewritten URI dispatching architecture. Paul has more details in his blog entry. |
Both the JSR and the reference implementation are developed in a very collaborative way. Schedule leading up to version 1.0 is here.
|
A tip from
Jakub
and
Paul:
Implementing RESTful Services using Jersey |
|
JAX-RS (JSR 311) and its Jersey reference implementation have been moving along simultaneously in a very open fashion. As a matter of fact, several editors drafts have previously been made available on http://jsr311.dev.java.net. It's now time for the JCP Early Draft Review. Comments are due in the next three weeks. |
If you are new to JAX-RS, this is all about exposing POJOs (obviously) as resources accessible via URIs and the HTTP protocol. This work focuses on the server-side, leaving client technologies such as jMaki or any other HTTP-enabled client technology do the fetching and presentation part.
|
Paul has announced the Jersey 0.4 release which tracks the latest API and Spec (also see changes). The Jersey team has quite a bit cooking for 0.5 (late December or January) including a new automaton-based URI-pattern matching algorithm, new entity providers, new simplified on-the-fly compilations, and more. It looks 0.5 will be a very interesting release. |
It is also nice to see references to contributions not just from Sun folks like Marc, Jakub and Paul but also significant contributions from Florian and Frank. Check Paul's writeup for more details.
|
The Early Draft Review Specification for JSR-311 is now available for Download. This review closes on 23 November 2007. The Expert Group site is jsr311@Java.Net and the implementation is at Jersey. Feedback is encouraged. |
|
As co-specifications leads Marc and Paul are busy working on JSR 311 (JAX-RS) but also on the Jersey reference implementation. Now that Jersey version 0.2.1 has been released, Marc is discussing new Jersey features implemented in the trunk to reflect the Expert Group decision to have a per-request default resource object life-cycle (vs. singleton). Non-empty constructors for a more natural instance initialization are also discussed. |
At the same time, Paul is requesting feedback on proposed changes to the Jersey architecture to better align with the HttpServlet* API, listing PROs and CONs.
|
If you're new to JAX-RS (JSR 311) and RESTful Web Service with Java, wondering how it impacts you as a developer, you should read this introduction to the various Sun efforts in that space.
If you're tracking the progress of Jersey, the JAX-RS Reference Implementation, you'll probably interested to hear that version 0.2.1 has been released today with a documented list of required JAR dependencies, illustrated in this demo showing how JAXB beans can be serialized as JSON or XML depending on the |
At this point, installing in GlassFish is fairly easy with a jersey-on-glassfish.xml ANT script. It'll get even easier once Jersey is made available on the GlassFish Update Center. Any day now I hear ;)
|
Marc and Paul are running a pretty transparent JAX-RS (aka JSR 311) EG. Paul recently discussed a post by Bill de hÓra's on Web Resource (as in URL) Mapping comparing different approaches. And Marc provided Several Clarifications, prompted by a recent post by Patrick Mueller. If you want more information about JAX-RS check the websites for its RI, Jersey and the EG, or go check the EG Mailing List. |
BTW, Japod reports that Jersey will soon be available.
|
|
Paul added support for pluggable type system in Jersey. All the supported types need to implement the EntityProvider interface and are registered in the META-INF/services file javax.ws.rs.ext.EntityProvider. Jakub used that system to add support for JSON encoding. Jersey is the GlassFish project that is implementing JAX-RS |
The JSON binding in JAX-RS enables to use application/json as
the MIME type and specify
JSONArray,
JSONObject as
method parameters and return type. The JSON binding in JAX-RS enables to write
code like the following:
@UriTemplate("/rates")
public class ExchangeRates {
@ProduceMime("application/json")
@UriTemplate("CZK")
public JSONObject getRates() {
try {
return new JSONObject()
.put("USD", 20.04);
} catch (JSONException ex) {
throw new WebApplicationException(ex);
}
}
}
JAX-WS takes advantage of a similar pluggable encoding layer in their implementation to provide a JSON binding.