0 Replies Latest reply on Nov 14, 2001 5:21 PM by Craig Reichenbach

    Stateful SessionBean instance question

    Craig Reichenbach Newbie

      Hi, I have a question about the following situation:

      I create a new SFSB with a no arg create() method from my home interface. I populate the SFSB with data, then get its Handle & store that in a HttpSession. On my next request, I get the Handle back from the session, get the SFSB object from that, and call methods to get the stored data back. This is working just great. My question involves the following observation: I have a "System.out.println( this);" occuring in the setSessionContext() method of the SFSB. I was surprised to see that a new instance of the stateful session bean is used every time this method call is issued (every request). However, my business methods use the original SFSB instance. So, why does setSessionContext use a new instance of my SFSB every time?

      Thanks,
      Craig