JAXB RI 2.0 EA is out
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)?
- 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.
- Ability to bind POJOs to XML. See my earlier blog for a taste, and you can also look at the compiler-generated code.
- Improved XML Schema support. See Sekhar's blog for more details.
- Schema generator. We can take annotated classes you wrote and generate a schema for you.
- 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.
- I re-implemented the marshaller. Our benchmark is telling us that it's 2 to 2.5 times faster than 1.0.x.
- StAX API support in the RI/API. This makes it even easier to bind a part of a document by using JAXB.
- 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.
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 java.net, so stay tuned for those developments.