• 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 and serialization

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

In the Session Management chapter(chapter 6) of HFSJ, the question no 12 has one option as:
When a session is moved from one JVM to another, attribute values that implement java.io.serializable will be transfered to the new JVM

This option is correct.

But I am not able to understand the fact that, if my attribute does not implement java.io.serializable then will it be transfered to other JVM or not?

can ony one throw more light on this topic in general??

thanks in advance.

regards,
sarang bharambe
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Following is the Extract from Servlet Specification.

Within an application marked as distributable, all requests that are part of a session
must be handled by one Java Virtual Machine1 (�JVM�) at a time. The container
must be able to handle all objects placed into instances of the HttpSession class
using the setAttribute or putValue methods appropriately. The following
restrictions are imposed to meet these conditions:
� The container must accept objects that implement the Serializable interface.
� The container may choose to support storage of other designated objects in
the HttpSession, such as references to Enterprise JavaBeans components and
transactions.
� Migration of sessions will be handled by container-specific facilities.
The distributed servlet container must throw an IllegalArgumentException
for objects where the container cannot support the mechanism necessary for
migration of the session storing them.


Hope it help

Thanks
 
sarang bharambe
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The container must accept objects that implement the Serializable interface.



my question is ,
is it true that:

The container accept objects that must implement the Serializable interface.

Regards,
sarang bharambe
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Not necessary

Thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic