• 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

session migration using serialization.

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How does session migration happen using serialization/de serialization when the servers are deployed in different physical machines?
To put it more crudely, how can the serialized text file be used transported to the other JVM on a different physical machine for the other server instance to deserialize the session state.
Hope I am clear about my query,
Thanks in advance,
William Kane
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's one of the main purposes of serialization, to have the freedom to transfer JVM objects to other machines and invoke remote methods on them.

Precisely how's it done depends on which transportation mechanism you use as well as well as the software, although its usually some form of XML I believe. For example, EJB and Web Services both use a form of serialization to transfer objects via RMI. Some web servers will detect whether or not external calls or truly external or not, and skip deserialization/deserilization of local objects as a performance enhancement.
[ November 04, 2005: Message edited by: Scott Selikoff ]
 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Scott Selikoff:
That's one of the main purposes of serialization, to have the freedom to transfer JVM objects to other machines and invoke remote methods on them.

Precisely how's it done depends on which transportation mechanism you use as well as well as the software, although its usually some form of XML I believe. For example, EJB and Web Services both use a form of serialization to transfer objects via RMI. Some web servers will detect whether or not external calls or truly external or not, and skip deserialization/deserilization of local objects as a performance enhancement.

[ November 04, 2005: Message edited by: Scott Selikoff ]


Thanks Scott,
But I am still not clear about your answer. How is session migration in web servers analogous to remote method invocation in EJB? Do we have a remote interface coming into play anywhere in this scenario? If no, how are the text files that have been serialized accessed to by the other web server to deserialize and reconstruct the migrated session?
Thanks again,
William Kane
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you saying text files? All objects attached to a HttpSession should be Serializable so the session can be serialized by the normal Java object serialization methods.
Are there servlet containers that serialize via XML?
Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic