This section contains the following tasks:
EclipseLink 2.4 or later.
Download EclipseLink from http://www.eclipse.org/eclipselink/downloads/
.
(Optional) EclipseLink Workbench. The EclipseLink Workbench is available in EclipseLink downloads. See the EclipseLink download page at http://www.eclipse.org/eclipselink/downloads/
.
APIs that were deprecated in releases before TopLink 11g Release 1 (11.1.1) were removed in EclipseLink. If your application uses any of those deprecated APIs or any APIs that were already replaced or removed from TopLink, you must update the application to use current APIs.
The following sections lists the replaced and removed APIs, with suggested substitutions:
Note: When suggested replacements are in |
The following tables list the APIs removed as of TopLink 11g Release 1 (11.1.1.1.). Use the replacement API listed in the tables.
Table 7-1 changetracking (oracle.toplink.descriptors.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
|
|
|
|
|
Table 7-2 databaseaccess (oracle.toplink.internal*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole class |
|
Table 7-4 mappings (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
Table 7-5 objectrelational (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole class |
|
Table 7-6 oraclespecific (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
.oraclespecific.TopLinkXMLType Foot 2 |
Whole class |
None |
oracle.toplink.oraclespecific.Oracle9Specific
was moved to an internal package and renamed to oracle.toplink.internal.platform.database.oracle.Oracle9Specific
. The replacement public API for oracle.toplink.oraclespecific.Oracle9Specific
is oracle.toplink.platform.database.oracle.Oracle9Specific
.oracle.toplink.oraclespecific.TopLinkXMLType
was a miscellaneous class, which does not have a replacement API.Table 7-7 publicinterface (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
|
Whole class |
|
oracle.toplink.publicinterface.DatabaseSession
was moved to an internal package and renamed to oracle.toplink.internal.sessions.DatabaseSessionImpl
. The replacement public API for oracle.toplink.publicinterface.DatabaseSession
is oracle.toplink.sessions.DatabaseSession
.oracle.toplink.publicinterface.Session
was moved to an internal package and renamed to oracle.toplink.internal.sessions.AbstractSessionImpl
. The replacement public API for oracle.toplink.publicinterface.Session
is oracle.toplink.sessions.Session
.oracle.toplink.publicinterface.UnitOfWork
was moved to an internal package and renamed to oracle.toplink.internal.sessionl.UnitOfWorkImpl
. The replacement public API for oracle.toplink.publicinterface.UnitOfWork
is oracle.toplink.sessions.UnitOfWork
.Table 7-9 entitymanager (oracle.toplink.sessions.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
All classes |
All methods |
Table 7-10 sessionconfiguration (oracle.toplink.tools.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
All methods |
None |
Table 7-11 xml (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole package |
|
|
Whole package |
|
|
Whole package |
. |
|
Whole package |
|
|
Whole package |
|
Table 7-12 XMLCommandConverter (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole class |
None |
|
Whole class |
None |
|
Whole class |
None |
|
"error_loading_resources" |
None |
|
"error_parsing_resources" |
None |
|
"unexpect_argument" |
None |
Table 7-13 Remote Protocols (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
Whole package |
None |
|
Whole package |
None |
|
Whole package |
None |
|
References for any of |
None |
|
References for any of |
None |
|
Whole class |
None |
|
Whole class |
None |
|
Whole class |
None |
|
References for any of |
None |
The following tables list the APIs deprecated in the releases prior to TopLink 11g Release 1 (11.1.1) and therefore removed in that release, due to the substitution of EclipseLink libraries. Use the replacement API indicated.
Note: Because deprecated classes and moved classes have the same name, you may get compile errors if you use |
Table 7-15 mappings (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
|
|
Table 7-16 descriptors (oracle.toplink.*)
Class Name | Method Name | Replacement APIs |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The following classes were removed in the release prior to TopLink 11g Release 1 (11.1.1):
OTSTransactionController
OTSSynchronizationListener
OracleSequenceDefinition
(use SequenceObjectDefinition
instead)
TimeTenSequenceDefinition
(use SequenceObjectDefinition
instead)
Other API changes include the following:
The persistence provider implementation in all TopLink releases since 11g (11.1.1) is packaged in eclipselink.jar
. It replaces all previous implementations, for example:
toplink.jar
toplink-essentials.jar
In TopLink 11g (11.1.1) Technology Preview 3, session finalizers were disabled by default to improve performance. To enable session finalizers, use Session method setIsFinalizersEnabled
(true).
Any Session
or ClassDescriptor
method that returns Vector
or Hashtable
will eventually be changed to return List
or Map
, respectively. To prepare for this change, cast Vector
and Hashtable
return types to List
or Map
, respectively. For example, although the Javadoc for ClassDescriptor
method getMappings
is java.util.Vector
, you should cast the returned value to List
:
List mappings = (List) descriptor.getMappings();
Other changes that now return Map
include the following:
ClassDescriptor.getQueryKeys()
ClassDescriptor.getProperties()
DescriptorQueryManager.getQueries()
EISInteraction.getProperties()
Session.getProperties()
Session.getQueries()
getAttributesToAlwaysInclude()
getSpecialOperations()
getValuesToExclude()s
EclipseLink continues to support native TopLink APIs; however, all oracle.toplink.*
packages are now renamed to org.eclipse.persistence.*
.
To migrate your application to use the new code base, you must rename the packages in your code. To facilitate this, a package renamer tool is included with the EclipseLink installation. Use this tool on all of the following:
project source code
project.xml
file
persistence.xml
file
sessions.xml
file
The package renamer is located in the toplink_install_directory
\toplink\utils\rename
directory. Windows and UNIX/LINUX scripts are included.
To run the package renamer using the scripts, do the following:
Find the packageRename.cmd
(Windows) and packageRename.sh
(UNIX/LINUX) scripts in toplink_install_directory
\toplink\utils\rename
directory.
Run either packageRename.cmd
or packageRename.sh
with the following arguments:
sourceLocation
- The directory containing the files to rename.
targetLocation
- The destination directory for the renamed files. The package renamer removes any existing Java and XML files, so it is advisable to specify an empty directory.
For example:
packageRename c:/mySourceLocation c:/myDestinationLocation
The package renamer performs a recursive directory search for Java and XML files to rename. The renamed version of each file is saved in the corresponding directory in the target location
The package renamer can rename EclipseLink XML configuration files, but depending on the type of file, you may need to make additional changes.
You can continue to use sessions.xml
files as is. For a more forward-compatible solution, run the renamer on your sessions.xml
files.
Deployment XML files from TopLink 10.1.3 and above can be read by TopLink 11.1.1 and later. 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"
To use EclipseLink as a persistence provider, you must run the renamer on your persistence.xml
files. The renamer updates the persistence provider to be EclipseLink and also update any native TopLink specific properties to the EclipseLink equivalent.