| Author |
HttpSession vs Stateful Session Bean
|
Kartik Shah
Ranch Hand
Joined: Dec 07, 2000
Posts: 102
|
|
|
What are the criteria for choosing between HttpSession and Stateful Session Bean ?
|
Kartik Shah
SCJP, SCDJWS, IBM Certified Websphere & XML, PMP & Six Sigma - http://blog.kartikshah.info
|
 |
Nicky Moelholm
Ranch Hand
Joined: Jan 20, 2002
Posts: 43
|
|
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.
|
Nicky Moelholm
MyCerts: SCJP 1.2, SCJP 1.5, SCJD, SCWCD 1.3, SCBCD 1.3, SCDJWS 1.4, SCEA, IBM 253
MyBooks: IBM WebSphere Application Server V7.0 Web Services Guide
|
 |
Mon Mayor
Ranch Hand
Joined: Mar 07, 2002
Posts: 40
|
|
Use Stateful Session beans 1. for sharing session across multiple applications 2. for maintaining transactional state 3. for application clients
|
 |
Emil Kirschner
Greenhorn
Joined: Jul 10, 2002
Posts: 10
|
|
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.
|
 |
Byron Estes
Ranch Hand
Joined: Feb 21, 2002
Posts: 313
|
|
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,
|
Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
|
 |
Rahul Mahindrakar
Ranch Hand
Joined: Jul 28, 2000
Posts: 1831
|
|
Kartik, Try out this download from JDJ which has an article relevant to the current topic under discussion http://www.sys-con.com/weblogic/pdf/benefits.pdf
|
 |
 |
|
|
subject: HttpSession vs Stateful Session Bean
|
|
|