1 Reply Latest reply on Apr 12, 2007 12:53 PM by Pete Muir

    Extracting service. Joining tables across schemas. Using Hib

    Thor Kummer Newbie

      Hello Seamers

      I'm doing a pilot Seam application for my employer, which already uses Hibernate and Spring. We like the ease of use, but we are wrestling with some questions.

      1. We would like to factor out any reusable "business logic" into a service layer, possibly in a different EAR. It is clear that we can access EJBs remotely from Seam, but can we deploy Seam's session beans to a different EAR and access it from the rest of the application. Is it advisable?

      2. We have concerns about hardcoding the OR-mapping in the Java annotations. Is it possible to use Hibernate xml mappning files for part of the mappings along with the annotations?

      3. Is it possible to map tables in different schemas to the same network of objects, without hardcoding the schema names in the Java source files?

      We will be grateful for any input (and RTFM advice as long as it includes page numbers).

      TKummer

        • 1. Re: Extracting service. Joining tables across schemas. Using
          Pete Muir Master

           

          "kummer" wrote:
          2. We have concerns about hardcoding the OR-mapping in the Java annotations. Is it possible to use Hibernate xml mappning files for part of the mappings along with the annotations?


          You can use a mix of hbm.xml files, orm.xml files (JPA/EJB3 xml schema) and annotations. AFAIK you can mix annotations and xml for a class.

          3. Is it possible to map tables in different schemas to the same network of objects, without hardcoding the schema names in the Java source files?


          You should be able to do this using xml