• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Migration in a clustered environment  RSS feed

 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
Is the following statement correct?
When a session is moved from one JVM to another, attribute values that implement either Serializable or HttpSessionActivationListener interface are transferred.


If yes, does this means that we have two options if we want to do something concrete when session migrates across servers in a grid?

Thnaks,
Reema
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Reema Patel:
Hello All,
Is the following statement correct?


If yes, does this means that we have two options if we want to do something concrete when session migrates across servers in a grid?

Thnaks,
Reema


All the attributes that you store in a session has to be serializable , in order to send it through the wire during session migration.
The second one is not an alternative ,but a effect that will happen when a session migrates from one node of the cluster to another.
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi rahul,
Thanks for the post.
But I didn't get much from it.

In short, say I have a class that only implements HttpSessionActivationListener interface, (no Serializable here), then will it be notified and move out sucessfully?

Thanks,
Reema
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Reema Patel:
Hi rahul,
Thanks for the post.
But I didn't get much from it.

In short, say I have a class that only implements HttpSessionActivationListener interface, (no Serializable here), then will it be notified and move out sucessfully?

Thanks,
Reema


I do not know from where you got this stuff.HttpSessionActivationListener is a listner , the class implementing this is not suppose to implement serializable interface.Only the classes of the object that you are planning to put in the session are suppose to implement serializable interface.
One appropriate events , the methods of listner would be called.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answering the original post.

"That means all your serialized session attributes and your listener will get transfered."
[ February 07, 2007: Message edited by: Adeel Ansari ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!