Hi
What is Session Migration in Java?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Dec 26, 2011, 4:11 AM
Session Migration is a mechanism of moving the session from one server to another in case of server failure. Session Migration can be implemented by:
a) Persisting the session into database
b) Storing the session in-memory on multiple servers.
Thanks
AartiPosted Dec 26, 2011, 2:52 AM
For a session migration listener, implement the HttpSessionActivationListener interface and write code for the methods sessionDidActivate() (for actions at session activation) and sessionWillPassivate() (for actions at session passivation), as appropriate.
Listner :HttpSessionActivationListener Methods
The HttpSessionActivationListener interface specifies the following methods. Implement this interface in a listener class you will use to track session migration (activation or passivation) events.
•void sessionDidActivate(HttpSessionEvent hse)
The servlet container calls this method when the session is activated.
•void sessionWillPassivate(HttpSessionEvent hse)
The servlet container calls this method when the session is about to be passivated.
The servlet container creates an instance of the HttpSessionEvent class to use as input for HttpSessionActivationListener method calls. See "HttpSessionListener Methods, HttpSessionEvent Class" for information about this class.
Prabhu RajaPosted Nov 10, 2011, 1:44 AM
Check out Here : http://www.interviewcorner.com/Answer/3944/session-migration-in-java