Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Migration and serialization

 
sarang bharambe
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Hi,

Not necessary

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic