"waynebaylor" wrote : 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).
Actually, that is not possible since the value of the unitName annotation gets put into
the bytecode. Out of curiosity I tried what you suggested, but it does not compile
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049889#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...