1 Reply Latest reply on Nov 27, 2006 2:04 PM by gavin.king

    persistence layer

    koatto

      i've an old hibernate+jsf app and i want to move to seam.
      I'm planning to setup one or more session beans accessing hibernate and implementing crud for my persistent objects.

      Should be better to convert all my data object to ejb3? what could be the best advantage of having ejb3 instead of normal pojos?

      thanks.

        • 1. Re: persistence layer
          gavin.king

          There are two questions here:

          (1) should I migrate from Hibernate to JPA?

          You don't need to, so don't do it now. Set up a Seam-managed Hibernate session, and you should find it easy to migrate your existing code. You won't need to change the existing entity classes, or make much change to existing data access code. You can always migrate to JPA later if you feel like it.

          (2) should I migrate the business logic layer from POJOs to session beans?

          Again, you don't need to, but since you will be doing the conversion to Seam components *anyway*, you may as well.