2 Replies Latest reply on Nov 12, 2007 9:09 AM by damonchong

    Separate ejb jar and war file, how to do jndi lookup

    damonchong

      Hi,

      I am trying to perform a jndi lookup of a stateless session bean (which is deployed separately in a ejb jar file) from a web application. I can do a normal JNDI as below:

       try{
       InitialContext ctx = new InitialContext();
       cacheSession = (SessionCache) ctx.lookup("SessionCacheSLB/local");
       }
       catch(Exception e){
       e.printStackTrace();
       }
      


      But I wonder if I can instead do something like

      @JndiLookup("SessionCacheSLB/local")
      SessionCache mySession;
      


      That would really make my day! ;-)

      And congrats to the JBoss Seam team for the launch of version 2.0 GA!