Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateful Session Bean  RSS feed

 
Ashok Jaganathan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I say a session scope in JSP bean as Stateful session bean?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Come again? If you're asking whether a JavaBean stored into HttpSession with session scope is a stateful session bean, the answer is no. If you're asking whether you can store a reference to a stateful session bean into HttpSession with session scope, the answer is yes but only by breaking the rules. The reference isn't serializable, which is required by the spec for all objects put into HttpSession but in practice you can get away with unserializable objects in HttpSession as long as you don't have a cluster (i.e. the container doesn't attempt to serialize the objects).
 
Rangarajan Suresh
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ashok Jaganathan:
Can I say a session scope in JSP bean as Stateful session bean?

If you are just comparing the way these two work , Yes.
Both have an identifier and maintain the session state with the calling client. Obviously, the purpose and the mechanism are very diff.
 
Ashok Jaganathan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Lasse and Rangarajan for your replies.Rangarajan can you briefly tell me in what way the purpose and mechanism are different.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!