Hi Peter,
Thanks for your response!

My use case: I am developing a app where little companies will register to use 
for some days for free. After that period, these companies will have to pay or 
leave the aplication. With separeted data bases, it is possible to just erase 
the unused database without affect any other, is possible to make daily backups 
and restore only the database of a specific company without any kind of danger 
of handle another's companies DBs.

The app is already developed today in the model "B" you wrote, but actually we 
have only 5 clients and we are having some trouble when handle data. I am 
talking about more than 2000 companies, so we thought that separated databases 
would be the solution for that.

about the "A" option you wrote: I did not understand why implement Driver or 
Connection interface, because when using pure Hibernate I found out that is 
pretty easy to create Session objects that points to diferents databases, so I 
thought that to do it in JBoss would be as easy.

I was planning to use the security declaration to get not only the userName and 
password but also the database name, and them, when the user call any action, I 
could get the database Name through the session context and then inject the 
correct entityManager to the sessionBean.


Well, now I am seriously thinking about use any kind of interceptor to get the 
queries String and change it to point to the user database (databasename.table 
for example), or even to give up the EJB model and handle the transactions for 
myself.

Sorry if I did not made myself clear, I am not a native english speaker.

Thanks!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232009#4232009

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232009
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to