olá, galera, estou aprendo javaEE 6 e tenho uma dúvida:
tenho esse ejb:
@Remote
public interface BookEJBRemote{//crud methods}
@Stateless
@LocalBean
public class BookEJB implements BookEJBRemote{//methods}
publiquei no glassFish como Study_javaEE.jar (ver img anexada)
Como posso acessar esse EJB a partir de um cliente desktop como segue ??
public class Client{
public static void main(String[] args) throws Exception {
Context ctx = new InitialContext();
BookEJB bbookEJB = (BookEJB) ctx.lookup("java:global/Study_javaEE/BookEJBRemote");
System.out.println(bbookEJB);
}
}
ao rodar o código anterior obtive:
Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
obrigado!!
