4 Replies Latest reply on Feb 5, 2007 12:06 PM by Norman Richards

    Pure JPA Persistense Layer

    Augusto Fontes Newbie


      I'm starting the development of an application that at this point will have a single web interface but later it will be necessary to build another interfaces as well, for example a Swing front end.

      So I would like to have a pure JPA layer that doesn't import anything but javax.persistence.* classes and annotations allowing me to use it outside a jee 5 container but I also would like to use Seam and Hibernate validation in my Web Interface as I am using in other projects. Is there any way to achieve that?

      I thought about extending my pure JPA classes and then add the complementary annotations (such as @Name and @Length), but that would cause a ClassCastException later, right? My EntityManager won't persist my new classes.

      What you guys recommend me?

      Thank you in advance,
      Augusto Fontes