Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Servlet Spec. regarding session attribute in Distributed Env

 
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
 
author
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
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic