2
Reply

Session Migration in Java ?

Prabhu Raja

Prabhu Raja

13y
5k
0
Reply


    in addition to below answer:-
    Session Migration:

    In Session Migration session is passivated in one VM and activated in another VM within a distributed app. In clustered environiments, load-balancing container will decide to send the request to which Container the request has to be sent for processing.
    There is only one HttpSession object for the entire web application regardles of how many VM's the application is distributed across and that session object move from one Virtual Machine to the other. These all will be take care by the HttpSessionActivationListener. HttpSessionActivationListener is an interface which consists of sessionDidActivate(HttpSessionEvent) sessionWillPassivate(HttpSessionEvent).


    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:
    1) Persisting the session into database
    2) Storing the session in-memory on multiple servers.