@GET @Path("/lookupGlobalEJBOutsideRemote") public String lookupGlobalEJBOutsideRemote() throws NamingException { EJBOutsideRemote ejbOutside = (EJBOutsideRemote) new InitialContext() .lookup( "java:global/lookup-jndi-ear/lookup-jndi-ear-ejb-impl/EJBOutsideImpl!fr.bdf.center.demo.jndi.outside.EJBOutsideRemote"); return "Lookup Global EJB Outside Remote : " + ejbOutside.sayHello(); }
@GET @Path("/lookupModuleEJBOutsideRemote") public String lookupModuleEJBOutsideRemote() throws NamingException { EJBOutsideRemote ejbOutside = (EJBOutsideRemote) new InitialContext() .lookup( "java:module/EJBOutsideImpl!fr.bdf.center.demo.jndi.outside.EJBOutsideRemote"); return "Lookup App EJB Outside Remote : " + ejbOutside.sayHello(); }
@GET @Path("/injectEJBOutsideRemote") public String injectEJBOutsideRemote() { return "Inject EJB Outside Remote : " + ejbOutsideRemote.sayHello(); }