users@jaxb.java.net

ObjectFactory vs Constructor; package name vs class

From: William Simons <william.simons_at_childrens.harvard.edu>
Date: Mon, 31 Oct 2005 10:49:34 -0400

I'm migrating from JAXB 1 to JAXB 2.0 and I want to make sure that I'm
sticking to the newest coding conventions. Which is the preferred manner of
constructing objects? Using the ObjectFactory.createX() method or new X()
constructor?

Also, which is the preferred way to initialize the JAXBContext? Using the
string package name or the Class of the object that you want to
marshal/unmarshal?

Thanks,
Bill