17 Aralık 2010 Cuma

JPA 2.0 with GWT

Well, if you are using JPA 2.0 with GWT, and you are using your entity objects as DTO between GWT layer and web layer and you are using annotations for object mapping, you should do the following items ;
  • Download jpa2.0 sources . This file does not contain all source files of JPA 2.0 classes, only annotations and some interfaces are included. 
  • Put this jar file to your classpath
  • Add   <inherits name="javax.Persistence"/>  to  your [module name].gwt.xml file 
  • If your gwt version is below 2.1 , then you should add gwt-java-mathh to your project

2 yorum:

  1. Actually I am keeping another version of the persistence classes but without the annotations..

    Good note, I may start using it

    YanıtlaSil
  2. How did you make the JAR file. I am using
    hibernate-jpa-2.0-api-1.0.1.Final.jar
    how can i adapt it ??

    YanıtlaSil