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

From Eclipsepedia

Jump to: navigation, search
m
m
 
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{EclipseLink_UserGuide
+
'''[[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]
|info=y
+
'''
}}
+
==Specifying the EclipseLink Runtime==
+
To specify the EclipseLink MOXy JAXB runtime:
+
# Create a text file named '''jaxb.properties''' with the following entry:<div><source lang="java">
+
javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory
+
</source></div>
+
#Copy the file to the same directory in which your model classes reside.
+
#Create a '''JAXBContent''' using the standard APIs:<div><source lang="java">
+
JAXBContext jaxbContext = JAXBContext.newInstance(Customer.class);
+
</source>
+
</div>
+
  
Because you do ''not'' need to change any of application code, you can easily switch between JAXB implementations.
+
http://www.eclipse.org/eclipselink/documentation/2.4/moxy/runtime001.htm
 
+
 
+
 
+
{{EclipseLink_MOXy
+
|next=[[EclipseLink/UserGuide/MOXy/Runtime/Bootstrapping|Bootstrapping]]
+
|previous=[[EclipseLink/UserGuide/MOXy/Runtime|Runtime]]
+
|up=[[EclipseLink/UserGuide/MOXy/Runtime|Runtime]]
+
|version=2.2.0}}
+

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