[jboss-user] [JBoss Seam] - Re: multiple data sources
do-not-reply at jboss.com
Wed Nov 7 12:30:10 EST 2007
I'm just now revisiting this topic (got pulled onto a higher priority project), and another concept / question occurred to me.
Since the entities are the same for all the datasources do I really need multiple persistence units? i.e. the only difference is the underlying connection right? Could I just get the delegate and change the Connection object at runtime?
It seems, on the surface, like this should work... if the connection is bound to the EntityManager and it doesn't change connections and the EntityManager is bound to the Seam session then changing the connection once, when the proper source is determined should work.
Can anyone comment on the feasibility of this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102634#4102634
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102634
More information about the jboss-user