[jboss-user] [EJB 3.0] - How to pass PersistenceUnit name at run time

yogesharora do-not-reply at jboss.com
Wed Sep 17 01:43:20 EDT 2008


HI All,
I want to enject entitymanager based on persistence unit name passed at runtime. Can any body tell how to do it.
For Ex:
@PersistenceUnit(name="xyz")
EntityManager em;

I want name to be populated at run time. (In above scenario it is hardcoded "xyz").



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

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



More information about the jboss-user mailing list