Dear all,
I am new to ejb tech,
i want to know the difference between stateful session bean
and statless session bean and how the state is maintained
-
Difference between stateful session bean and stateless session b (2 messages)
- Posted by: kirubakaran damodaran
- Posted on: April 02 2003 22:36 EST
Threaded Messages (2)
- My View by dead walker on April 02 2003 23:55 EST
- Difference between stateful session bean and stateless session b by Aaron Robinson on April 08 2003 06:04 EDT
-
My View[ Go to top ]
- Posted by: dead walker
- Posted on: April 02 2003 23:55 EST
- in response to kirubakaran damodaran
just like session parameter and application parameter -
Difference between stateful session bean and stateless session b[ Go to top ]
- Posted by: Aaron Robinson
- Posted on: April 08 2003 06:04 EDT
- in response to kirubakaran damodaran
You would use stateful session beans to maintain converstaion state, just as you would use HttpSession. There are many debates about which of these to use. One reason for using stateful session beans over HttpSession is that your client may not be http based. Stateful session beans do not tend to scale well.
Stateless session beans can maintain state, but it's only useful if it's not conversational, as it is unlikely that the same stateless session bean instance will be used across requests by the same client. The idea behind a statelsss session beans is that any instance can server any request. An example of state that may be held in a stateless session bean would be a database connection, or a JNDI connection.