コード例 #1
0
 @GET
 @Path("/lookupGlobalEJBInside")
 public String lookupGlobalEJBInside() throws NamingException {
   EJBInside ejbInside =
       (EJBInside)
           new InitialContext()
               .lookup(
                   "java:global/lookup-jndi-web/EJBInside!fr.bdf.center.demo.jndi.inside.EJBInside");
   return "Lookup Global EJB Inside : " + ejbInside.sayHello();
 }
コード例 #2
0
 @GET
 @Path("/injectEJBInside")
 public String injectEJBInside() {
   return "Inject EJB Inside : " + ejbInside.sayHello();
 }