users@jersey.java.net

[Jersey] Re: Decorating response entities

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Tue, 02 Aug 2011 10:34:39 +0200

On 2.8.2011 3:42, Stephane Bailliez wrote:
> On Mon, Aug 1, 2011 at 8:50 PM, ljnelson <ljnelson_at_gmail.com
> <mailto:ljnelson_at_gmail.com>> wrote:
>
> On Mon, Aug 1, 2011 at 8:09 PM, sbailliez [via Jersey] <[hidden
> email] <http://user/SendEmail.jtp?type=node&node=6643252&i=0>> wrote:
>
> mmm indeed. I was initially discarding this option it since I
> found it would be a bit too cumbersome to specify it
> constantly but looks like it could be the best approach. I
> tried the one I mentioned, and quickly bumped into the issue
> that it would be decorating absolutely everything, which in
> practice is not really the case. I would need to be able to
> know the media type before the response is created and likely
> do some other gymnastics.
>
>
> If you wanted to stay within the JAX-RS API, you can do it if you
> squint at
> http://weblogs.java.net/blog/ljnelson/archive/2010/04/28/pushing-jersey-limit
> and hold your nose.
>
>
>
> Very nice write up Laird, thanks for the reference.
> I may have an advantage for now, is that I'm not dealing with jaxb in
> this project :-/

Laird is implementing the second option we discussed in the thread.
It is still applicable even without JAXB.

~Jakub