How Statefull session Bean is better than Servlets Session?
That�s not always true and is not actually the point. Only because SFSB and HttpSession can both be used for storing conversational state, it doesn�t necessarily mean that you have to compare both technologies only through this feature. They both have different capabilities and solve a different set of problems. However if you are strictly interested which of the two manages the session information better, then let me tell you this: HttpSession is preferred; and not only from a design persperctive, but here there is a strong reason why WebLogic recommends managing sessions through HttpSession.
For both HttpSession and SFSB WebLogic uses an in-memory replication algorithm within a cluster (I already explained this principle on this forum several times now). In order to replicate the HttpSession object WL keeps track of the data that changed in the HttpSession. WL can easily do that because the container knows that the clients call setAttribute() method in order to change the HttpSession object. Therefore the server will replicate only the part of the session that was changed and not the whole session object. However the container has no way to figure out which data was changed in a SFSB and which data was not; WL replicates always the entire SFSB.