We had the same problem and never really found a solution for it.
The (business/legal) requirement was to store each clients financial data in a separate
DB, but have a single web application where a use can switch between different clients
(depending on authorizations).
We never really found a way to solve the problem. As a workaround we
did what Ralph proposed and individually configured lots of datasources (one for each
client, plus a couple spare ones) with generic names and access the entity manager
programmatically.
Besides being an ugly hack and wasting resources it does not really solve the problem the
original poster is having:
What do you do if the database connection details are only delivered dynamically after
login?
This would be dead-easy to do with JDBC, but Hibernate/JPA/Seam makes this hard to do.
@bravefencer (?): Put code into code tags!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089606#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...