Saturday, November 22, 2008

Toplink10g to Eclipselink Migration

No brainer and Toplink team has done a great job to make it very simple and a matter of running a script. Even though the steps are clearly documented on but you may run into some gotchas. Some of the very advanced Toplink mappings use amendment methods and post insert, build events etc. These information are stored in Toplink's classes and descriptors XML files. The migration scripts of Eclipselink does not replace these classes even if the mwp file is successfully opened in the workbench. The solution is very simple.. Replace all classes starting with package name oracle.toplink to org.eclipse.persistence under the classes/ and descriptors/ directory of the Toplink workbench. And following script can be handy as well:

for i in `ls *`
sed "s/$1/$2/g" $i > t;
mv t $i;


Susant said...

Hello Ashish,
its good info for migration of toplink10g to eclipselink.
could you please tell me is there any tool oracle has which will be take the ejb which is devloped using oracle10g on top of toplink and migrate into eclipse link or do we need to do mannually as there are lot ejbs to convert and any easy solution will be much appriciated.

ashish said...

Hi Susant,
I do not work on the EJBs so I may not be the right person to answer this but there is a Toplink/JPA forum you can bounce your question off of: