How about changing your code to:
| InitialContext ctx = new InitialContext();
| NamingEnumeration<Binding> list =
ctx.listBindings("persistence-units");
| while (list.hasMore()) {
| Binding nc = (Binding)list.next();
| System.out.println("Persistence Unit EMF is relative : " + nc.isRelative()
+ " name: " + nc.getName()+" [class:
"+nc.getClassName()+"]");
|
| Object o = ctx.lookup("persistence-units/" + nc.getName());
|
| if(!(o instanceof EntityManagerFactory)) {
| System.out.println("No good; o instance of "+o.getClass().getName());
| }
| else {
| System.out.println("Got it again!");
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173860#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...