• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSession and Activation / Passivation

 
Jonathan Gerrish
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Do HttpSessions ever get Passivated/Activated after a given period of inactivity in the same way as Stateless Session Beans?

If so, is it required by the Servlet specification, or is it just a value add feature of some servlet containers?

I can't find any reference to information on this, just that there is an interface allowing you to be notified for activation / passivation events.

I found HttpSessionActivationListener which suggests such a thing, but I am not sure if its required by the spec, or even consistently implemented across containers.

Anyone know anything about this?

Thanks in advance, Jonathan.
 
Ricardo Ferreira
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jonathan,

Stateless Session Beans never are activated or passivated. Stateful Session Beans instead, hold those capatibilities. Try to search out about the subject, regarding this new fact

Just a tip: HttpSession objects are distributable by nature. They can survive for a crash if clustering features are available. Since, web containers must not passivate or activate session objects. If this is your desired behavior, use SFSF instead.

Regards,
 
Jonathan Gerrish
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey :-)

Stateless Session Beans never are activated or passivated. Stateful Session Beans instead, hold those capatibilities. Try to search out about the subject, regarding this new fact


... of course, I meant Stateful Session Beans :-)

Just a tip: HttpSession objects are distributable by nature. They can survive for a crash if clustering features are available. Since, web containers must not passivate or activate session objects. If this is your desired behavior, use SFSF instead.


What exactly do you mean by "HttpSession objects are distributable by nature". Clustering is not part of the Servlet Spec is it... its a value add feature by some containers. Also, does the servlet spec state that HttpSession objects must not be activated or passivated?

Thanks, Jonathan.
 
Shouton Eulle
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpSessions ever get Passivated/Activated



HttpSession never get Passivated or Activated.

it will die/alive.

it will die, if you murder it, or just a timeout.
invalidate() that the method provided by HttpSeesion.

this question is better to ask in SCWCD forum.
however, it will be too easy to get answers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic