hi,
in follow up from a discussion on the Apache General List: http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%[email protected]%3e I have some quite basic questions about migrating a existing Project using Hibernate to openJPA. We are using a Hibernate 3.4 + XDoclet2 to generate the HBM files. We don't use a Spring Managed Transaction Manager yet for handling the Session (but we should). We have a lot of HQL Statements in the Code. The project is: http://openmeetings.googlecode.com (For anybody interested the Sources are located into http://openmeetings.googlecode.com/svn/trunk/singlewebapp/src/app/org/openmeetings/app/ ) And we are applying for Apache Incubation, so we have to get rid of Hibernate. What is your general advice on an easy way to migrate to openJPA? Writing the intermediate database description per object, you use annotations I guess? In what kind of Java-Structure do you Map Many-To-One relations? How do you handle Multi-Threaded Applications and Database Caches? In hibernate a very common problem is that you have problems with Objects that are several times in the Cache but in different Threads. In that case a Session.flush does not really work as it only flushs one Thread. This can be solved in Hibernate by using a Spring managed Transaction Manager. What is JPAs approach in that area? And finally => HQL Statements, I guess I have to rewrite them all, but is the openJPA *JPQL* very different from that? From what I have seen its not that big Issue to refactor those statements to JPQL. And I have a lot more questions before I can finally decide on what is the best and feasable way to migrate. But I am eager to learn ^^ so maybe somebody is eager to give us some tipps I will try to study the docs, but i have not seen any kick-start example yet that covers the most of basic topics. Is there any sample that can be re-used? thanks a lot Sebastian Wagner -- Sebastian Wagner http://www.webbase-design.de http://openmeetings.googlecode.com http://www.laszlo-forum.de [email protected]
