You can use a String variable as long as it's labeled final.
For Example:
| public class MyClass
| {
| private final String persistence_unit_name = MyNameFinder.getName();
|
| @PersistenceContext(unitName=persistence_unit_name)
| EntityManager em;
|
| ...
| }
|
Where MyNameFinder.getName() is a static method that retreives the name from a file (or
however you want to do it).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049850#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...