File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlets session   Vs   Statefull Session Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets session   Vs   Statefull Session Bean" Watch "Servlets session   Vs   Statefull Session Bean" New topic

Servlets session Vs Statefull Session Bean

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1404
What situation we choose Statefull Session Bean than servlets session?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

A 'Statefull Session Bean' is an EJB component. Many servlet apps are written without EJB. For those apps, the ServletSession is the most convenient place to store data across web hits.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Balaji Akella
Ranch Hand

Joined: Oct 29, 2003
Posts: 35
In terms of a design consideration, Servlet's session is more relevant for maintaining a user's web session. Servlets is not best suited for the application specific data which could consist of data used for business logic. Stateful session beans are useful in this scenario.


In the morning there is hope; in the afternoon, fulfillment; in the evening, memory; at night, peace.
Raja gopal Y

Joined: Mar 08, 2005
Posts: 15
Hi Alll...

The Simple Answer is

"Statefull Session Bean doesn't support HTTP,where as Servlets support HTP"

Any Comments!!!

CHEERS !!!<br /> <br />RAJAGOPAL Y
Consider Paul's rocket mass heater.
subject: Servlets session Vs Statefull Session Bean
jQuery in Action, 3rd edition