Your code will work only if TestEJB is also ejb, you can not inject (use @EJB) 
ejb refrence in classes which are not ejb's, to call ejb outside ejb container 
you schould write:

  |             InitialContext ctx = new InitialContext();
  |             test object = (test)ctx.lookup("testjarname/testBean/local");
  | 

replace testjarname with real your ear or jar name where bean is packed.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966221#3966221

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966221
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to