Skip to main content

Woodstox rocks Glassfish v2

Posted by spericas on June 1, 2007 at 8:59 AM PDT

This is a great example of how your opinion counts and how a community can work together to improve a product. We kept hearing from many of you about how good the Woodstox XML parser was, especially how well it performed. Your voice has been heard, Woodstox is now officially part of Glassfish and this is the story of how it happened.

I don't have any official data, but I suspect that Woodstox is one of the most popular StAX parsers in the market. Tatu Saloranta, Woodstox' creator, has done a fantastic job not only writing the code but also building an active community around it. Our internal testing showed that Woodstox was both robust and fast, but there were a couple of wrinkles that needed ironing before we could make it part of Glassfish. First, JAX-WS (or more specifically JAXB) uses some backdoor methods in SJSXP to optimize serialization performance which were not available in Woodstox. Second, conformance testing showed that Woodstox 3.2.0 failed a couple of TCK tests.

About two months ago I contacted Tatu with the intention of addressing these problems and working together to make Woodstox a viable option in Glassfish. Tatu was incredibly supportive and within 10 days or so he had a new release of Woodstox (3.2.1) ready for us to test. As part of our discussion, I learned that he did not have access to the StAX TCKs, so I wrote some tests that would mimic the behavior of the TCKs. As a result, Woodstox 3.2.1 now passes all the TCK tests.

Enough history, how can I try it out? Bhakti has written a nice blog about how to enable Woodstox in Glassfish. Try it out and let us know; some of our internal data (WSpex running on top of Japex) has shown that using Woodstox you can get a significant improvement (30-40%) in some cases.