1 Reply Latest reply on Jan 11, 2006 12:52 PM by bill.burke

    Context in stateless session bean

    martinganserer

      Hello,

      I have a stateless session bean. I inject the SessionContext as follows

      private @Resource javax.ejb.SessionContext ctx;


      In a method I want to get the host name:

      System.out.println("Host:" + (String) ctx.lookup("java:comp/env/host"));


      The problem is that host (and other properties) are always null!

      What I am doing wrong?