-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: createEntityManager(map)
PostPosted: Fri Jul 24, 2009 7:12 am 
Newbie

Joined: Fri Jul 24, 2009 6:57 am
Posts: 1
I use Seam framework and Hibernate JPA.
I have too many databases I have to connect to from one application.

There are about 200 database schemas.
There is a databaseuser that 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 have read the following Knowlegde Base item:
http://seamframework.org/Documentation/HowDoIUseMultipleDynamicEntityManagersInSeam

I think the next fragmant slightly slow:
Code:
EntityManagerFactory emf = Persistence.createEntityManagerFactory("manager");
EntityManager em = emf.createEntityManager();


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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.