views:

47

answers:

2

Hi Can session object be migrated from one VM to another VM or It passivated in one VM and activated in other VM? How?

+1  A: 

The contents of the session are serialized (if they implement Serializable) on the hard disk whenever the servlet container stops. You can use the same technique to "migrate" it. ObjectOutputStream can give you some directions.

Bozho
+2  A: 

You may be looking for what's usually called HTTP Session Replication. Many application servers offer it, in different ways. See e.g. the Tomcat Clustering/Session Replication HOW-TO.

Mirko Nasato