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/Examples/JPA/Migration/OracleTopLinkNative"

m
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Migrating from Oracle TopLink to EclipseLink==
+
'''[[Image:Elug_draft_icon.png|Warning]] This page is obsolete. Please see "Migrating from Native TopLink to EclipseLink" in the  ''[http://www.eclipse.org/eclipselink/documentation/2.4/solutions/migrnativetoplink.htm EclipseLink Solutions Guide]'' for current information.'''
 
+
This article will give an overview of how to migrate an Oracle TopLink project to EclipseLink
+
 
+
===Deprecated Oracle TopLink API===
+
 
+
API that has been deprecated in Oracle TopLink will be removed from EclispeLink.  If your code makes use of any deprecated TopLink API, you will have to update it to use the API recommended in the deprecation comment.
+
 
+
===Rename Packages===
+
 
+
The base package has been renamed from "oracle.toplink" to "org.eclipse.persistence".  Some lower level packages have also been refactored. To cope with this issue and package rename tool is included in the intstall. This package renamed replaces package and class references with the updated ones. You should run the tool on your source code, project xml, persistence.xml and sessions.xml
+
 
+
====Running the Package Renamer====
+
 
+
The package renamer can be found in foundation/eclipselink.util/rename-utility. That directory contains both a jar and an EclipseLink project.  It can be run from either of those, or from the scripts included in the installer.
+
 
+
The utilities.MigrateTopLinkToEclipseLink class contains the main method you should run.  It does not have any external dependancies.  To run the renamer:
+
 
+
* run either packageRename.cmd or packageRename.sh located in the install's bin directory with two arguments - sourceLocation and targetLocation
+
** e.g. packageRename c:/mySourceLocation c:/myDestinationLocation
+
** sourceLocation should be a directory containing files you would like to rename.
+
** targetLocation is the destination directory.  Note: the package renamer will remove existing java and xml files so in most cases you will want to specify an empty directory
+
** The package renamer does a recursive directory search for java and xml files to rename and puts the renamed version in the cooresponding directory in the targetLocation.
+
 
+
===Dealing with XML Configuration files===
+
 
+
The package renamer is capable of renaming our XML configuration files, but depending on the type of file, you may need to make additional changes or have other options.
+
 
+
====Sessions XML====
+
 
+
Sessions XML files from Oracle TopLink 11 can be read by EclipseLink.  You can continue to use those files or for a more forward compatible solution, run the renamer on your sessions xml files.
+
 
+
====Deployment XML====
+
 
+
Deployment XML files from Oracle TopLink 10.1.3 and above can be read by EclipseLink.  You can continue to use those files or for a more forward compatible solution, run the renamer on these files and replace the version string in the XML Header with the following:
+
 
+
"Eclipse Persistence Services - 0.1"
+
 
+
====Persistence XML====
+
 
+
In order to use EclipseLink as a persitence provider you will have to run the renamer on your persistence.xml files.  The renamer will update the persistence provider to the EclipseLink persistence provider and also update any Oracle TopLink specific properties to the EclipseLink equivalent.
+
 
+
====ORM XML====
+
 
+
ORM XML is non-TopLink dependant and does not need to be updated.
+

Latest revision as of 12:51, 30 January 2013

Warning This page is obsolete. Please see "Migrating from Native TopLink to EclipseLink" in the EclipseLink Solutions Guide for current information.

Back to the top