• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Stateful Session Bean

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I say a session scope in JSP bean as Stateful session bean?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic