0 Replies Latest reply on Sep 16, 2006 8:49 AM by stephan.opitz

    stateful session bean - access works but every time new one,

    stephan.opitz

      if i lookup from my application for a stateful session, i get one:
      try {
      Context context = new InitialContext();
      sessionFacade = (SessionFacade) context
      .lookup("shale-clay-mailreader/" + SessionBean.Local);
      // "shale-clay-mailreader/SessionBean/Local"
      } catch (NamingException e) {
      e.printStackTrace();
      }

      problem is after a request the lookup is away and a new one will be created...

      i used jsf and saved the reference in a bean which had an applications scope session
      so i could have my stateful session bean until i destroy it with @Remove

      but why i have to save the reference?

      is not the advantage that a stateful session bean knows and saves the depending client

      ?

      or should it be - and while walking from request to request the jndi lookup creates new instead of get the old one, because the client looklike changed