[jboss-user] [JBoss Seam] - One

Stateless Bean do-not-reply at jboss.com
Wed Nov 7 08:39:48 EST 2007


Hi,
I found this declaratiorn in seam docs:


  | <components xmlns="http://jboss.com/products/seam/components" 
  |             xmlns:persistence="http://jboss.com/products/seam/persistence"
  | 
  |     <persistence:managed-persistence-context name="customerDatabase"
  |                        persistence-unit-jndi-name="java:/customerEntityManagerFactory"/>
  |         
  |     <persistence:managed-persistence-context name="accountingDatabase"
  |                        persistence-unit-jndi-name="java:/accountingEntityManagerFactory"/>            
  | 
  | </components>
  | 

I understand that this enable to use 2 em's for two different db.
Let's think I got login page and dropdown list to choose db like :
db 1 , db 2, how to manage that?

Do I need to declare Two differend em in my source code? or maybe is way to do it dynamically?

Can anyone show me code how to do it?

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102533



More information about the jboss-user mailing list