Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

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 16: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

Back to the top