dev@jax-ws.java.net

Re: Optimized JAXB encoding <was> Re: CVS update [rearch-2005]: /jax-ws-sources/jaxws-ri/rt/src/com/sun/xml/ws/sandbox/message/impl/jaxb/

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 20 Mar 2006 07:40:12 -0800

Paul Sandoz wrote:
> Hi Santiago,
>
> There is a design issue here in that optimized encoding is being pushed
> to the Message layer rather than implemented at the encoding layer
> (which is why things will become a little more hacky to ascertain when
> XOP is used).
>
> IMHO this fix is OK to performance test but IMHO we need to do this
> properly by writing an optimized Encoder implementation that can obtain
> references to the JAXB beans given appropriate hints that these are the
> most optimal representation to use. Then it may not be necessary to
> support the Map concept in Zephyr because we can essentially turn things
> inside out i.e. Zephyr does not have control of the OutputStream.

I thought the semantics of "sjsxp-outputstream" is defined in such a way
that it's there only when we are writing to UTF-8 OutputStream in a
plain XML fashion, so I think the code is correct.

If we are writing to XOP, we use a custom XMLStreamWriter impl, so the
"// TODO: XOP handling" doesn't have to do anything.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com