The Source for Java Technology Collaboration
User: Password:



Kohsuke Kawaguchi

Kohsuke Kawaguchi's Blog

A story of migration from JAXB 1.0 to 2.0

Posted by kohsuke on August 05, 2005 at 03:13 PM | Comments (2)

Today, I've heard from JAXB's internal customers that they had a successful transition from JAXB 1.0 to 2.0. It was from Rebecca Searls, who's working on the migration tool of Sun Java System Application Server 8. I'm not particularly familiar with what this tool does, but it's a tool that helps you to migrate from other vendor's app server to Sun's app server.

Such a migration involves in reading and converting vendor-specific deployment descriptors, which are mostly XML. So naturally they wanted to find a simple way to read/write XML, and hence JAXB. Here's what they found:

JAXB 1.0 JAXB 2.0
# of schema files 62 62
# of JAXB customization files 14 7
# of generated Java files 8326 1084
size of the compiled class files 66407K 3685K

Notice the huge improvements in the footprint (66M->4M). It's partly because we no longer generate unmarshaller/marshaller/validator, it's partly because the spec team and the EG worked hard to reduce the number of classes we generate.

Rebecca also listed the following benefits:

  1. No more ObjectFactory.createXYZ. The problem with those factory methods was that they throw a checked JAXBException. Now you can simply do new XYZ(), no more try/catch blocks. (I know, I know, ... this is one of those "what were we thinking!?" things)
  2. Less customization files = less things to worry about.

Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • What about the performance?

    Posted by: kirillcool on August 06, 2005 at 03:54 AM

  • I'm planning to write another blog about recent performance improvement work I've been doing in the JAXB RI.

    Posted by: kohsuke on August 09, 2005 at 01:39 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds