Re: JSR311: Response isn't adequate

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 29 Feb 2008 12:49:14 -0500

On Feb 28, 2008, at 1:08 PM, Marc Hadley wrote:

> On Feb 28, 2008, at 12:10 PM, Bill Burke wrote:
>> And I've already told you that this just not cut it for specific
>> use cases (Blobs). It is going to make EJB integration(really
>> anybody that uses JTA) unusable in those cases. I don't think Lobs
>> are an unreasonable use case to support.
>>> - In a servlet container you can inject HttpServletResponse and
>>> use the OutputStream from that but you'll have to set any headers
>>> yourself before you commence writing.
>> So, anything that doesn't fit the @Provider model, we'll have to
>> escape to Servlet API or worse, have our own vendor specific
>> extension for? Hmmmm...All because we can't inject an OutputStream.
> I'm not I understand why blobs don't fit the provider model ? If the
> provider runs in the same connection+transaction scope as the
> resource method and can be injected with all the same stuff what
> doesn't work ? Sorry if I'm being dense here.
> Injecting an OutputStream is only half the work, if you still want
> to be able to use Response to specify headers then you'd either have
> to call that first and somehow pass that to the runtime then start
> writing to the output stream or we'd have to buffer the output
> waiting for the method to complete and return the response. Again,
> sorry if I missed something, I'm still catching up from a few days
> vacation.
Just to note that this is issue 6 which I've updated with a link to
this thread in the archives:


Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.