dev@jsr311.java.net

RE: JSR311: Feedback from W-JAX presentation

From: Liu, Jervis <jliu_at_iona.com>
Date: Wed, 7 Nov 2007 03:02:30 -0500

> -----Original Message-----
> From: Stefan Tilkov [mailto:stefan.tilkov_at_innoq.com]
> Sent: 2007?11?7? 13:52
> To: dev_at_jsr311.dev.java.net
> Subject: JSR311: Feedback from W-JAX presentation
>
>
> On Nov 2, 2007, at 1:45 PM, Stefan Tilkov wrote:
>
> > On Nov 2, 2007, at 1:26 PM, Paul Sandoz wrote:
> >
> >> If you get any feedback can you send a summary of it?
>
> I gave my talk at W-JAX Munich yesterday (the slides are available
> online [1], but I spent at least half the time talking about REST in
> general, so they may not be that interesting to this list.)
>
> Quick feedback from the audience (~60 people, 95% Java developers,
> half of them with good to very good knowledge of REST):
>
> - In general, pretty much everybody liked the overall approach
> - Some people were concerned about how to integrate this with their
> existing, EJB 3-based architectures, esp. regarding the SessionBean-
> based layer they're currently exposing as SOAP web services.
> I don't
> believe there's any easy way because of the architectural differences
> - Somebody had written something similar (annotation-based REST API)
> themselves; I'm trying to get them to take a closer look and provide
> some feedback. One of the things they did differently was to
> annotate
> the methods with the "TypeConverter" (which is similar to
> EntityProvider) to be used.
>
> Based on this last feedback, I'd like to discuss two issues:
>
> - Maybe "EntityProvider" should be named different. I'm aware that
> "entity" is the correct term from an HTTP perspective
> (although to be
> exact, I think it would have be "entity body" in this context), but
> from a Java perspective it's a little unexpected.
> - Maybe there should be a way to override the EntityProvider
> selection
> based on an annotation on a method. The one case where I
> believe this
> could be useful is when a MIME type such as "application/xml"
> is used
> - e.g. the JAXB EntityProvider could handle the default, while some
> specific cases would be overridden.
>
This is a very common requirement. For example, a JSR-311 runtime uses JAXB EntityProvider to handle "application/xml" by default, but a user may want to use Aegis data binding to marshall/unmarshal XML instead. Even though the spec does say "An implementation MUST support application-provided EntityProvider implementations and MUST use those in preference to its own pre-packaged EntityProvider implementations when either could handle the same request." (section 3.1.2), but it is not sufficient. We need a mechanism that can explicitly link an EntityProvider with a particular content type.

Jervis

> Stefan
> --
> Stefan Tilkov, http://www.innoq.com/blog/st/
>
> [1]
> http://www.innoq.com/blog/st/presentations/2007/2007-11-06-JSR
> -311-W-JAX.pdf
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland