users@jaxb.java.net

Re: Unexpected element JAXB 2.0

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 11 Feb 2005 08:39:13 -0800

Vallamshettla, Anand wrote:
> I added an extra tag (which is not in schema) inside a complex element; JAXB
> 2.0 did go through fine reading the file but all the elements (inside this
> complex element) after this extra element are not being read properly.

That sounds like a bug to me. If you could file an issue, or send a test
case to us, we'd be happy to take a look.

> May be
> this is similar to Discard handler being used when unexpected element is hit.
> What we expect is that if such unexpected element appears in xml, throw error
> just on that element and go on fine with the rest of the elements.

Yes, that is the expected behavior, and we do have a few test cases to
make sure exactly that happens, but there's no such thing as too many tests!


> When are you expecting JAXB 2.0 being available for production releases? Will
> source code be released soon?

I think it will still take some time before it finalizes, but we do plan
to post EAs and hopefully regular builds (just like we do with JAXB RI 1.0)


> Just to let you know - JAXB 2.0 is taking 3 secs now with the same XML that
> took 1 sec with JAXB 1.0 (haven’t tested using any performance testing tool -
> just ran on my machine).

I'm even more interested in seeing that test case. Our tests have been
showing that the unmarshal performance actually increased, if only
marginally. What does that '3 sec' include? Is it a sustaining
unmarshalling performance? Or is it more like the turn-around time
between the launch of your test and the termination of it?

Kirill did a benchmark against the current drop of JAXB RI 2.0, and I
believe his result confirmed ours [1].

It is possible that we are taking more time setting up JAXBContext, now
that a lot is happening in the runtime.

[1] https://bindmark.dev.java.net/current-results.html
-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com