dev@jsr311.java.net

Re: JSR311: Issue 43: javax.activation support

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 18 Jun 2008 21:49:26 -0400

I talked to some of our WS-* guys. They think its a good idea but have
never really been happy with the performance of JAF.


Marc Hadley wrote:
> Issue 43[1] resulted from some internal feedback that it would be useful
> to be able to use existing java activation framework (JAF)
> DataContentHandlers with JAX-RS rather than force people to rewrite them
> as MessageBodyReaders and Writers.
>
> For example, given a resource method:
>
> @POST
> Foo getFoo(Bar bar) {...}
>
> An implementation could make use of an existing handler to deserialize
> the request along the following lines.
>
> DataHandler dh = new DataHandler(dataSource);
> DataFlavor df[] = dh.getTransferDataFlavors();
> DataFlavor barDataFlavor = findMatchingFlavor(Bar.class, df);
> Bar = (Bar)dh.getTransferData(barDataFlavor);
>
> JAF isn't as flexible as JAX-RS entity providers (there's no access to
> annotations, generic type, other headers etc) so I think it should be
> supported as a fallback when a suitable MessageBodyReader or Writer
> can't be found.
>
> Thoughts, comments ?
> Marc.
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
> [1] https://jsr311.dev.java.net/issues/show_bug.cgi?id=43
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com