0 Replies Latest reply on May 28, 2006 2:28 AM by tsar_bomba

    injecting EJB into a servlet

    tsar_bomba Newbie

      I'm rather new so forgive my ignorance. I've been using JNDI lookup code to get a stub to my SLSBs:

       public static Foo getFoo()
       IFoo foo = null;
       //get EJB
       InitialContext ctx = new InitialContext();
       foo = (IFoo)ctx.lookup("earName/FooBean/local");
       catch (NamingException exp)
       return foo.getFoo();

      Is there (or will there be) a way to simply inject the interface into the web layer (servlet, jsp, etc??)


      @EJB IFoo foo;

      I know Seam is out there and somehow helps w/ this, however I'm using Wicket and don't plan to use JSF anytime soon.

      Thanks in advance!