views:

186

answers:

2

I am trying to make my java application more standards compliant and one of the biggest issues i am facing is transitioning our ORM framework from Castor JDO to a JPA implementation (thinking either Hibernate or DataNucleus). We have our own persistent data abstraction layer so the basic refactoring can easily be done by adding a JPA implementation to our API and creating the mapping. Then it becomes more complicated, we use Castor OQL, not heavily but not insignificantly, and that is not abstracted. We also make raw JDBC queries directly to the database, but go through Castor to get the connection. We are using ehcache to cache our objects between several servers.

Questions:

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

2) Does the JPA query language offer similar features as Castors OQL? or will I need to look into JDO?

3) Can I use ecache with any JPA implementations?

4) Any one know of a tool that can convert from Castor mapping to JPA mapping?

finally, I guess, any thoughts on the strengths of different JPA implementations? Hibernate is attractive because it is so widely used, but my biggest concern is simplicity so perhaps DataNucleas, EclipseLink (or something else) might serve me better?

thanks,

peter cowan

A: 

in case it's not obvious, i meant "Transitioning from Castor to JPA"...

Peter Cowan
A: 

EclipseLink is a great choice when transitioning from Castor, as EclipseLink is a JPA provider and like Castor supports object-to-XML mapping (using the MOXy component).

Blaise Doughan