users@jaxb.java.net

ObjectFactory is NOT used in unmarshal

From: Alan Chaney <alan_at_muzlink.com>
Date: Thu, 18 Jun 2009 10:25:21 -0700

I'm deeply confused. I've read the JAXB tutorial several times.

I am creating a JAXBContext by using the form
'JAXBContext.newInstance(pakageName)' and then using this context to
unmarshal an XML file.
During the unmarshalling process although I have an ObjectFactory
defined in the same package as the annotated classes, it seems that the
unmarshaller ignores this
and uses reflection to create an instance of the class.

Is this the case? Under what circumstances, if any, would the
unmarshaller use the ObjectFactory (annotated with XMLRegistry)

Thanks in advance

Regards

Alan Chaney