Originally posted by Nicky Moelholm: Hi, If you want better reuse of your user session handling you put it in the Stateful session bean. The latter makes it possible to use the logic from Swing clients etc.
or from ejbs. you cannot access a http session maintained by a servlet from an EJB.
An excellent point... Using HTTPSession in any code relegates the object to only handling HTTP requests unless you put some sort of wrapper around it. A stateful session bean is independent of the underlying transport layer or protocol run on the transport layer. HTTPSession is more closely related to the presentation layer than the business layer and creates a limitation in the applicability of your design. Regards,