2 Replies Latest reply on Dec 3, 2007 10:21 AM by richard_lavoie

    Persistence EJB Hibernate JDO

    richard_lavoie

      Hello there,

      I'm new to seam and I try to find out if it possible to interchange the persistence technologies without changing the code.

      Is it possible to use JDO for persistence? (I know for Hibernate and EJB)
      How to declare persistence.xml and components.xml to use the different persistence technologies? Do I have to write a separate delegate-object?

      Is there any example or link?

      Thanks a lot
      Richard

        • 1. Re: Persistence EJB Hibernate JDO
          pmuir

          persistence.xml is for JPA/EJB3 so not relevant for JDO. Yes, you could probably use Seam with JDO but I don't know of anyone doing it. Seam shouldn't need JPA or Hibernate to run, so report issues here. But you will loose a lot of the power of Seam as there is no integration.

          • 2. Re: Persistence EJB Hibernate JDO
            richard_lavoie

            Hello Pete,

            I think to implement a web application which is independent of the persistence layer: If I want to change Hibernate by JPA, the changes must be minimal, that's why a thought about a delegator, which will manage the persistence layer. Sincerely I didn't find out how to do it yet. It would be nice, if changing to JDO would work so easely too.
            What would I loose, If I use JDO instead of the other two?
            If you know any link please let you.
            Thank you in advance.
            Richard