Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Stateful Session Bean

 
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?
 
author
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).
 
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.
 
ice is for people that are not already cool. Chill with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic