I am attaching a patch, which updates camel-jpa component to use JPA2. In detail:
a) Upgraded OpenJPA for 1.2.2 to 2.1.1
b) Updated feature camel-jpa to use the latest version of OpenJPA.
c) Test class enhancement is not done with openjpa plugin, instead of ant-run-plugin.
d) Changed lockEntity method, to return true
if the entity object cannot be lock and is array (The newer version of openjpa won't lock object arrays, such as results of nativeQueries).
For d we might need to find a more elegant way to do it in the future.