Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on HttpSessionActivationListener

 
viswanath sastry
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the event that drives HttpSessionListener and HttpSessionActivationListener is the same(HttpSessionEvent),will the methods sessionDidActivate()and sessionWillPassivate() be called on session attributes after a session is created and before a session is destroyed? or is it only in the case when sessions are migrated across jvm's?
Thanks to all.
 
bobby chaurasia
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not 100% sure but Since
sessionDidActivate(HttpSessionEvent event) is a
Callback after the session activates, and since sessions can not be carried over from one JVM to another, It will be called after the session activates.
[ June 02, 2003: Message edited by: bobby chaurasia ]
 
viswanath sastry
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
quote from boddy chaurasia
sessionDidActivate(HttpSessionEvent event) is a Callback after the session activates, and since sessions can not be carried over from one JVM to another, It will be called after the session activates

im sure sessions can be migrated from one jvm to another but they wont span multiple jvm's. and as far as "Callback" is considered im not sure i understand you there.
Would Appreciate responses.
Thanks.
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from HttpSession class API:
When container migrates a session between VMs in a distributed container setting, all session atributes implementing the HttpSessionActivationListener interface are notified.
so, this listener related to the vms migrations, but not to the simple "one jvm" session management.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic