aspose file tools*
The moose likes Servlets and the fly likes Sessions in a distributable as described in the servlet spec. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sessions in a distributable as described in the servlet spec." Watch "Sessions in a distributable as described in the servlet spec." New topic
Author

Sessions in a distributable as described in the servlet spec.

Eliott West
Greenhorn

Joined: Jun 14, 2002
Posts: 2
Hi all, I have recently been reviewing the topic of 'session migration' as described in the J2EE servlet 2.3 spec. However, I am finding the spec a little ambiguous and in contradiction to other articles and notes on the subject of ditributable web applications.
In the servlet spec it states:
'Within an application that is marked as distributable, all requests that are part of a session can only be handled on a single VM at any one time.'
To me this suggests that all requests that occur in a session must be directed to a specific VM instance. Doesn't this imply that requests may only be directed to a different VM instance when the session is over (i.e. invalidated)? In which case is there any point in migrating the session (as it is now invalid)?
Other articles mention that sessions can be shared across VMs but don't really discuss how or when this should occur.
Does the servlet spec defintion of session behavior within a distibutable necessitate that 'sticky sessions' are used with in a cluster, or can requests be directed on a request-by-request basis? In the situation I describe above load balancing and failover would appear to be quite coarse grained.
I gather that various app servers have their own solutions to this problem, but I would like to understand the official requirements for this defined by the spec.
Can anyone clarify how this works and where I am going wrong in my understanding?
Many thanks - Eliott.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sessions in a distributable as described in the servlet spec.