We've been using JPA 1.0 for some time now. We want to move ahead to JPA 2.0. How can this be done?
Asked
Active
Viewed 2,383 times
1
-
The person who decided to down-vote this has no idea that it is extremely hard to find at least a mailing list entry on this. Migration is a very common occurrance and migration between two standards, the latter being an upgrade of the former, is very common. I believe a reason to down-vote should've been given. – Ravindranath Akila Nov 24 '12 at 19:18
2 Answers
4
You could do worse than to read the migration guide from OpenJPA and then ask a more specific question.

hd1
- 33,938
- 5
- 80
- 91
-
1
-
-
-
-
1http://openjpa.apache.org/builds/2.0.0/apache-openjpa/docs/migration_considerations.html#jpa_2.0 ;-) – Ravindranath Akila Nov 24 '12 at 19:04
-
-
Actually, I couldn't find a proper link either. I feel my answer is adequate if one actually coded fully compliant to JPA 1.0. Just changing the persistence.xml entry would work, IMO. It worked in our case. – Ravindranath Akila Nov 24 '12 at 19:06
-
I read through the document, and most of the configuration required were OpenJPA specific. Vendor dependent correct? – Ravindranath Akila Nov 24 '12 at 19:07
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/20038/discussion-between-ravindranath-akila-and-hd1) – Ravindranath Akila Nov 24 '12 at 19:09
-
You said you "do prefer a more vendor independent link" and proceeded to provide one from apache's openjpa project. This seems to be more bickering, so I'll stop now – hd1 Nov 24 '12 at 19:10
-
You asked for a better link, and I found the original source of the link you provided, openjpa docs itself, and is more readable. – Ravindranath Akila Nov 24 '12 at 19:12
0
We changed the version name and xsd as the following:
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
Which worked fine.
Please mention in comments if you think additional things need to be done and I will update this answer.

Ravindranath Akila
- 209
- 3
- 35
- 45