Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/MOXy/Runtime/Specifying the EclipseLink Runtime"

m (Specifying the EclipseLink Runtime)
m
 
(41 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Specifying the EclipseLink Runtime==
+
'''[[Image:Elug_draft_icon.png|Warning]] For the current release, see [http://www.eclipse.org/eclipselink/documentation/2.4/moxy Developing JAXB Applications Using EclipseLink MOXy, EclipseLink 2.4]
 +
'''
  
Specifying the EclipseLink MOXy JAXB runtime is easy.  Simply add a text file named jaxb.properties in the same directory as your model classes with the following entry:
+
http://www.eclipse.org/eclipselink/documentation/2.4/moxy/runtime001.htm
 
+
<source lang="java">
+
javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory
+
</source>
+
 
+
Then when you create a JAXBContext using the standard APIs it will be the MOXy implementation:
+
 
+
<source lang="java">
+
JAXBContext jaxbContext = JAXBContext.newInstance(Customer.class);
+
</source>
+
 
+
Since none of your application code needs to change, you can seamlessly switch between JAXB implementations.
+

Latest revision as of 15:26, 6 November 2012

Warning For the current release, see Developing JAXB Applications Using EclipseLink MOXy, EclipseLink 2.4

http://www.eclipse.org/eclipselink/documentation/2.4/moxy/runtime001.htm