• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Different JAXB Implementations

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MOXy supports XPath expressions, which I find to be very useful.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic