users@jaxb.java.net

Re: [JAXB 2.0] Making the QNames available in the ObjectFactory

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 06 May 2005 13:31:31 -0700

jastrachan_at_mac.com wrote:
> I'd find it quite handy to be able to refer to QName constants inside
> the ObjectFactory generated from an XSL/WSDL. Right now they are
> private and have a mangled name; any chance of either making the fields
> public, or creating a little static getter method to return them? Or is
> there a good reason to keep them hidden?

In some of the big schemas people use, there are too many QNames and
they actually go beyond the limit of the static initializer (for the
code that creates QName gets bigger than 64K.)

The RI currently stops generating QName constants before it hits this
limit as a stop-gap measure. We were too lazy to work around this issue
properly.

Another issue is the possibility of the collision between the generated
constant names. If the spec is going to talk about the public QNames, it
needs to define the collision resolution rules and etc.

Considering all those aspects, we felt that there are more important
issues we could spend our time on. And if the spec is not going to talk
about it, then the RI can't make them public, because our TCK people
wouldn't let us do it.

So that's how things came to the current state.

Do you feel strongly that we should make QNames public? Now that we have
your input, I guess we should probably revisit this issue...

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com