[jboss-user] [EJB 3.0] - Re: Where am I going wrong...?

snau2005 do-not-reply at jboss.com
Sat Aug 19 03:28:05 EDT 2006


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



More information about the jboss-user mailing list