1 Reply Latest reply on Sep 27, 2010 4:09 PM by Marcos Meneghette

    EntityManagerFactory in seam context

    Zo Ge Newbie
      I am new to the Seam framework.
      I have too many databases I have to connect to from one application.

      I have read the following Knowlegde Base item:
      http://seamframework.org/Documentation/HowDoIUseMultipleDynamicEntityManagersInSeam

      But my problem is a little different, there are about 200 database schemas.
      There is a databseuser who can reach all the schemas. I thought I could use a
      single EntityManagerFactory and I would use emf.createEntityManager(map); the
      map would parameterize the default_schema, because there are no differences between the construction of the different database schemas. I looked it up in the hibernate source code but it isn't supported.

      I suppose it is too expensive to configure in component.xml all the 200 database
      connections to be represented.
      Or should I use Hibernate SessionFactory methods?
      Does anybody have any experience about this?