File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes which method called sessionActivated or passivated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Servlets
Bookmark "which method called sessionActivated or passivated" Watch "which method called sessionActivated or passivated" New topic

which method called sessionActivated or passivated

jawwad ahmed
Ranch Hand

Joined: Dec 01, 2001
Posts: 179
Well i am confused about the question that
when session is migrated from server say 'A'
Which method is called on server 'A' (sessionActivated or Passivated)and when recieved on server 'B' which method is called on 'B'(sessionActivated or Passivated).
Graeme Brown
Ranch Hand

Joined: Oct 13, 2000
Posts: 193
As far as I am aware there are no methods sessionPassivate and sessionActivate.
What will happen is that when an HttpSession object on server A is passivated all attributes of the session object that implement the HttpSessionActivationListener
interface will have their sessionWillPassivate method called, then when the session is activated on B they will have sessionDidActivate called.

Joined: Feb 11, 2002
Posts: 1
A related question..
If an attribute has been attached to the session on Server A, when the session is migrated to Server B does the object get migrated aswell ?... i.e Does the objects stored within a session need to be serialisable if the application is to be distributable ?
I agree. Here's the link:
subject: which method called sessionActivated or passivated