Hi!
Serialization, to me, is when you from an object create a data representation of that object that, for instance, can be transferred using some means of communication.
With serialization, the object is the "mould" to create the serialized data from - the object is introspected and the data it contains is extracted.
If the class of the object changes, it still can be serialized without having to change any code or re-generating anything.
The serial representations before and after the change may not be compatible, but that is another issue.
With JAXB, an XML schema is the "mould" that specifies how the representation of an object is to look like.
From the XML schema, one or more JAXB bean classes are created. These JAXB bean classes are the
Java representation of the data structure specified by the XML schema.
The JAXB framework then can transfer from XML data to an object structure that consists of instances of JAXB bean classes or vice versa.
If the XML schema changes, you typically have to re-generate the JAXB bean classes.
I think the basic difference is: What is first?
With serialization, it is an object. With JAXB, it is an XML schema.
Hope this makes sense.