Is this going to be a problem?
I have a legacy system which uses javax.jdo API and XML mapping to handle writing/reading it’s objects from the DB.
I also have some code that extends this system, this part is using JPA with Hibernate (via annotations, with Spring managed declarative transactions).
I would like to get them under the same umbrella, so I can manage the transactions better. I want to rewrite my code to use DataNucleus, but I’d like to stick with JPA (so I don’t have to change the mappings, etc .. ).
So the question is: is it possible to mix JPA nad JDO in two parts of the project and span transactions over the mix? or do I have to choose only one approach?
Thanks for the help.
DataNucleus obviously would allow you to use JDO or JPA annotations (or both at the same time IIRC), and use persistence using either JDO or JPA (so JPA annotations with JDO PersistenceManager, and vice-versa). Likely if you have a PM for one part of the app and an EM for another part of the app then the transactions are separate.