Oracle TopLink supports access to any data store accessible through standard JDBC using standard SQL.
Additionally TopLink offers database platforms that allow for specific functionality to be exposed such as
native SQL, sequencing, out-join syntax, custom date/timestamp operators and formats, and schema import
and generation with the mapping editors.
To setup Oracle Toplink please follow the below steps :-
1.We need to identify the version of the Oracle Toplink used in the application.
2.Ensure the below jar files are downloaded.
o javax.persistence_2.0.0.jar (this version would be on the base Toplink version)
The above jar files can be found in this link http://www.oracle.com/technetwork/middleware/coherence/downloads/in...
3. Download Coherence from OTN and define user library 'Coherence' containing in this link
4. The application server lib folder must have the DB2JCC jar file.
5. The below parameters needs to be modified in persistence.xml file for working on DB2.This file is present in the source code folder of the application(usually META-INF).
6. In some cases Named queries might be used.These are written in standard sql. Mostly these queries work in DB2.
But still in case of any issues you may ensure the queries work fine in DB2.
For eg:- You may find an xml file called eclipselink-orm.xml (this xml file is present in the same folder as persistent.xml) where queries will be defined in the below way:-
1. Firstly Inside the JAVA code you will find the Toplink mapping as
2. Here Employee.findByLastNameLike is the name by which you will find in the xml file under the named-query tag.
These posts are my opinions and do not necessarily represent IBM’s positions, strategies, or opinions
Ramya Yeleswarapu mailto :- ramyeles@in[dot]ibm[dot]com