• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet Spec. regarding session attribute in Distributed Env

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic