This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Different JAXB Implementations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Different JAXB Implementations" Watch "Different JAXB Implementations" New topic
Author

Different JAXB Implementations

Sverre Moe
Ranch Hand

Joined: Jul 10, 2007
Posts: 110
I reckon most people uses the default JAXB implementation. Lately I have been checking to see what else is out there and if these other implementations are any better or worse.
The information is scarce, but what I did find is Eclipse MOXy and Apache Camel.

One can choose which implementation to use by indicating the context factory within a jaxb.properties file in each java package containing JAXB files.

Both Oracle JDK and OpenJDK are using the same Sun JAXB implementation. This is actually the default one and does not require a jaxb.properties file.
javax.xml.bind.context.factory=com.sun.xml.internal.bind.v2.ContextFactory

Eclipse MOXy
javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory

Apache Camel
javax.xml.bind.context.factory=org.apache.camel.converter.jaxb.JaxbDataFormat

Spring OXM
Spring does not use the JAXBContext to retrieve Marshalling and Unmarshalling. Instead one configures Jaxb2Marshaller and Jaxb2Unmarshaller directly. Though I'm not quite sure if Spring is compatible with JAXB own marshalling and unmarshalling interfaces, becuase Spring oxm brings its own interfaces for those.


I could not find any information of pros and cons of each of these over the others. Neither could I find any other JAXB implementation.

Does anyone have experience in using either Eclipse MOXy or Apache Camel for JAXB?
Anyone know of other JAXB implementations which offer benefits over the default one supplied by the JDK?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Different JAXB Implementations
 
Similar Threads
JAXB - efault parser?
Map XML data to domain entity POJOs
SOAP interface, RMI interface
struts causing it.. help plssssss
Purpose of hiding default constructor