In your pom.xml, change your dao.framework property from 'hibernate' to 'jpa-hibernate'. And, because of this (http://issues.appfuse.org/browse/APF-565), you'll have to to a '-Ddao.framework=jpa-hibernate' pretty much every time you do any 'mvn ...' command.

--Bryan

VJ22 wrote:
Bryan,

Tks for replying....

So I assume that the usage of entity managers and annotations is implemented
using Hibernate....What I wonder is how to get this setup running...as
simple change in the pom.xml aint getting the jar to be downloaded into my
repository...I can still see that appfuse-hibernat* is my DAO
implementation....Is there anything else to be done ?

Rgds...Vijay





Bryan Noll wrote:
In appfuse 2, hibernate is still the default persistence option, and the only thing different about it and the way it was in appfuse 1.x is the fact that it uses annotations instead of hbm.xml files. To implement this, we've stuck to the 'javax.persistence.*' annotations, so that it is hibernate agnostic. The default persistence option also still uses SessionFactory's, not EntityManagerFactory's.

Now, in appfuse 2, you have another option, namely jpa-hibernate. For this option, all the pojo's are annotated in exactly the same manner, except the persistence code (and spring configuration) uses EntityManagerFactory's instead of SessionFactory's.

Look here (http://appfuse.org/display/APF/Using+Hibernate) and here (http://appfuse.org/display/APF/Using+JPA) for the available documentation (as sparse as it may be at the moment).

--Bryan

VJ22 wrote:
Hello,

Our application running on Appfuse with Hibernate as ORM is to be ported
onto JPA.....

Some questions:

A) I presume Appfuse ships with Hibernate's implementation of the
JPA...So
this means that I create my domain objects using Hibernate Annotations
but I
still can use either Hibernate / EntityManager for CRUD methods ?
B) I did the configuration changes suggested to use JPA (web.xml and
POM.xml) ... However after building I did not notice
appfuse-jpa-hibernate.jar being created in my local repository...I
presume
that this has to be present for user/role CRUD methods to work with
Hibernate JPA as the base implementation....

Could someone pls explain the architecture vis-a-vis the JPA
implementation...I am getting confused

Tks in advance

Rgds...Vijay
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Reply via email to