Skip to main content

JAXB RI 2.0 EA is out

Posted by kohsuke on April 8, 2005 at 12:40 PM PDT

The past month has been hectic for me, between my wife delivering a baby and me delivering the JAXB RI 2.0 EA. I lost the race by about a month, but finally today we released the early access of the JAXB RI. This early access basically implements the JAXB 2.0 specification early draft 2 with some differences.

The EA passes almost all the tests that we used for testing 1.0.x series of the RI, plus more schemas that previously didn't work very well (including large schemas like IFX, FpML, and IRS e-file schemas). This is a good opportunity for the JAXB 1.0 users to try it, and it should give you a good feeling of what JAXB 2.0 is going to look like.

What's new in 2.0 (EA)?

  1. A lot cleaner/smaller generated code. Code that handles Java<->XML conversion is no longer generated; it's now prepared behind the scene at the runtime by using annotations. Ryan also put additional enhancements to our code generator to make it generate even more concise code.
  2. Ability to bind POJOs to XML. See my earlier blog for a taste, and you can also look at the compiler-generated code.
  3. Improved XML Schema support. See Sekhar's blog for more details.
  4. Schema generator. We can take annotated classes you wrote and generate a schema for you.
  5. More robust unmarshaller. In 1.0.x, if the unmarshaller sees an unexpected element, it tends to fail to recover from errors. Bhakti and I re-implemented the unmarshaller, and it can now handle documents whose elements are out-of-order, documents whose required elements/attributes are missing, and documents that have unknown elements/attributes.
  6. I re-implemented the marshaller. Our benchmark is telling us that it's 2 to 2.5 times faster than 1.0.x.
  7. StAX API support in the RI/API. This makes it even easier to bind a part of a document by using JAXB.
  8. Plugin architecture and documentation for the internals of the XJC.

Also check out the samples in the bundle and my past JAXB-related blog entries. I also plan to write more blog entries about various aspects of the RI in the future.

If you try the EA (and I hope you do!), please don't forget to send us feedbacks to the forum or the JAXB users list (but subscribe first.)

Future Plans

We plan to start weekly drops of the JAXB RI since this EA, so if you find any issues in this EA, chances are good that we'll be able to fix it relatively quickly. We also plan to move the source code to, so stay tuned for those developments.

Related Topics >>