*
The moose likes Servlets and the fly likes Question on HttpSessionActivationListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question on HttpSessionActivationListener" Watch "Question on HttpSessionActivationListener" New topic
Author

Question on HttpSessionActivationListener

viswanath sastry
Greenhorn

Joined: May 04, 2003
Posts: 24
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.


visu
bobby chaurasia
Ranch Hand

Joined: Mar 30, 2002
Posts: 84
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

Joined: May 04, 2003
Posts: 24
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

Joined: Jul 28, 2001
Posts: 260
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.


Asher Tarnopolski
SCJP,SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on HttpSessionActivationListener