This content has been marked as final.
Show 3 replies
-
1. Re: How to pass PersistenceUnit name at run time
alrubinger Sep 17, 2008 2:13 AM (in response to yogesharora)Annotation metadata must be available to the compiler, so it is impossible to inject this way if you depend upon a runtime value.
If you're not using bleeding-edge builds (ie. trunk), you may instead look up the EMF or EM in JNDI if you opt to bind them there:
http://docs.jboss.org/ejb3/app-server/tutorial/jndibinding/jndi.html
S,
ALR -
2. Re: How to pass PersistenceUnit name at run time
mnrz Oct 26, 2008 10:50 AM (in response to yogesharora)"ALRubinger" wrote:
Annotation metadata must be available to the compiler, so it is impossible to inject this way if you depend upon a runtime value.
If you're not using bleeding-edge builds (ie. trunk), you may instead look up the EMF or EM in JNDI if you opt to bind them there:
http://docs.jboss.org/ejb3/app-server/tutorial/jndibinding/jndi.html
S,
ALR
Hi
this solution works in JBoss only, is there any other way so the application becomes portable across the App servers.
would you have a look at my topic?
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=144560&start=0&postdays=postDays&postorder=postOrder&highlight=highlight
thanks -
3. Re: How to pass PersistenceUnit name at run time
alrubinger Oct 27, 2008 1:04 AM (in response to yogesharora)Replied at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=144560.
We'll continue discussion there.
S,
ALR