aspose file tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes HttpSession vs Stateful Session Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "HttpSession vs Stateful Session Bean" Watch "HttpSession vs Stateful Session Bean" New topic
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: HttpSession vs Stateful Session Bean
 
Similar Threads
httpsession objects and stateful session beans
Diff between HttpSession and Stateful Session bean
Amusing...
isIdentical
http session object,ejb session bean