users@jaxb.java.net

Applicability of JAXB

From: Nick Duan <nick.duan_at_TRW.COM>
Date: Thu, 23 Jan 2003 12:18:56 -0700

After reading the spec and playing with the samples, I have some thoughts I'd like to share and get some feedbacks from the experts. I'm new to the group, so please forgive or ignore if you find my comments out of focus.

1. One of the goals of JAXB (as defined in the spec) is to circumvent SAX/DOM by allowing applications to access XML data directly via Java objects. But the new Java APIs generated by xjc still have to be incorporated into your application. I'm not sure if the effort is going to be less than using SAX/DOM's API since most people are familiar with the standard. If you design an application from scratch, your application will be bound to the schema and JAXB APIs. So if the schema changes, you have to modify and recompile your application, whereas it wouldn't always be the case if using SAX/DOM.

2. Customization could be a very useful feature of JAXB. But why the binding declarations have to be defined within an XML schema itself? Suppose I have one schema to be customized for different applications, so I have to define multiple schema files, each with a different binding declaration. Usually XML schemas are defined and administrated in a central repository on the web, creating your own schema everytime you want to customize the binding seems to be quite awkward. I think it will make JAXB more extensible if binding declarations are externalized from the schema itself, similarly as XSLT definitions for an XML doc.

3. Apparently JAXB still uses SAX/DOM underneath when marshalling/unmarshalling an XML doc. Conceptually, you should be able to do the marshalling/unmarshalling without building the DOM tree, at least for performance reasons. Any thought or future plans regarding this?

4. Has anyone done any comparison studies on JAXB with other similar products? Castor, JBind, etc..

5. Does anyone acutually use or consider using JAXB for applications? I'd really appreciate if you could provide some insider thoughts.

Thanks a lot!

ND