Converting Stateful to Stateless SessionBean?


EJB programming & troubleshooting: Converting Stateful to Stateless SessionBean?

  1. Converting Stateful to Stateless SessionBean? (2 messages)

    1. I changed only




    and it worked. How is it possible? Can someone please explain to me how all the instance variables etc still work?

    I tried this on WebSphere 4.x

  2. dont think that that the state of your stateless session bean is maintained. It totally depends on the server when to do away
    with an instance of a stateless session bean and what is happening in your case is that you have the same instance beign used across subsequent method calls. But that's totally in the descrition of the container it can destroy the instance anytime and that will happen in a quicker time if u have a large number of beans active in the container.
  3. Your ejbCreate might be having no arguments in both the cases.The working of the session statefull and stateless beans depends upon container how it manipulates iys life cycle.