users@jaxb.java.net

Using existing classes

From: Leon Smith <leon2000_at_pacbell.net>
Date: Mon, 23 Dec 2002 14:43:58 -0800

Sorry for the last HTML post, my email client is screwy:

Hello, I have been creating an application server for the past two years in which each of many classes gets loaded from an XML file. I am switching from my own proprietary binding scheme for performance reasons. My benchmark programs show JAXB to be very acceptable in terms of speed (roughly twice as fast as Castor for example), but I am a little mystified about the requirement to generate new classes from the schema.

Isn't this like requiring new classes for serialization ? Unmarshalling from XML is just one tiny part of the functionality of these classes. Wouldn't it make more sense to generate "helper" classes and pass a "target" class as an argument for unmarshalling ?

How do most people actually make this work in practice ? I have complex hierarchies established so I really can't subclass from the implementation classes, plus I don't see how to unmarshall into a subclass anyway.

If I add my behavior to the generated classes, I don't see that it will be preserved if I have to change the schema and generate again.

I really want to use JAXB, but right now I am at a loss for how I could. Any suggestiions would be very much appreciated.

Thanks

Leon