You can't inject something if you don't know the name. If you have to determine
the name at runtime, you'll have to do it inline.
<core:managed-persistence-context name="myManagername"
auto-create="true" persistence-unit-jndi-name="java:/myjndiname">
| </core:managed-persistence-context>
public void someMethod(){
| String emName = getEMName();
| EntityManager em = (EntityManager)Component.getInstance(emName, true);
| ...
| //do some work
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090417#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...