[jboss-user] [Beginners Corner] - Multiple schema access
ander.gborges
do-not-reply at jboss.com
Mon May 18 19:17:40 EDT 2009
Hi People,
I am looking for a solution to my problem for days but I didn´t find anything that could really help me.
In my app I am using JBoss 4.2.3 GA and EJB3.
What I need:
Allow that each customer of my system (Today 5 but more than 2000 sooner) have it own database (Can be the same database but diferent schema). I mean, use the same entities and sessions.
I tryied to create the entityManager inside my stateless session, but without success. Today I was deep inside the jboss code looking for the code that instantiates the EntityManager when I put the code
| @PersistenceContext(unitName = "default")
| protected EntityManager entityManager;
|
because I realized that if I found this code, I would be able to change the unitName programatically and force JBoss to instantiate the correct EM and then I wouldn´t have to change any session or entity code.
I beg anyone to give me a north, could be links, concepts or any kind of example. I would really apreciate that.
Thanks in advance.
Anderson Geison Borges.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231741#4231741
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231741
More information about the jboss-user
mailing list