• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Spec. regarding session attribute in Distributed Env

 
sean cee
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Servlet Spec says
"Developers are not guaranteed that containers will call readObject and writeObject methods on
session attributes if they implement them, but are guaranteed that the Serializable closure of their attributes will be preserved."
I don't get what it means by "guaranteed that the Serializable closure of their attributes will be preserved"
Anyone can clarify ?
Thanks in advance
Sean
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In simple terms, this means that it will be as if simple serialization will be used to replicate your objects between JVMs, even though the container may not actually be using serialization.
For example, you can expect transient fields not to survive the trip between one JVM and the next.
- Peter
 
sean cee
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Peter,
Thanks for your post.
So what that phrase means is
"even though readObject() and writeObject() is not guaranteed to be called, your attribute will go through something much like Serialization."
Thanks
Sean
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic