Migrating from Castor to JPA

I am trying to make my Java application more standard, and one of the biggest problems I have encountered is moving our ORM infrastructure from Castor JDO to a JPA implementation (assuming either Hibernate or DataNucleus). We have our own constant level of data abstraction, so basic refactoring can be easily done by adding a JPA implementation to our API and creating a mapping. Then it becomes more complicated, we use Castor OQL, but not strongly, but not insignificantly, and it does not abstract. We also make raw JDBC queries directly to the database, but go through Castor to get a connection. We use ehcache to cache our objects between multiple servers.

Questions:

1) In general, are there any significant differences in how Castor and JPA handle object objects that I should be aware of?

2) Does the JPA query language offer similar features like Castors OQL? or will I need to learn JDO?

3) Can I use ecache with any JPA implementation?

4) Does anyone know a tool that can convert from Castor mapping to JPA mapping?

finally, I think some thoughts on the strengths of the various JPA implementations? Hibernate is attractive because it is so widely used, but my biggest problem is simplicity, so maybe DataNucleas, EclipseLink (or something else) can help me?

thanks,

peter cowan

+3
1

EclipseLink - Castor, EclipseLink JPA , Castor, -XML ( MOXy).

0

Source: https://habr.com/ru/post/1707621/


All Articles