Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

session in distributable sys

 
tony wang
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If a session migrates from a JVM to another one in the same app context, how to implement such app and the servlets?
a- <distributable/> in web.xml
b- implements HttpSessionActivationListener to servlets and declared in web.xml <listener>
c- anything else
What about HttpSessionAttributeListener, HttpSessionBindingListener?
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about HttpSessionAttributeListener, HttpSessionBindingListener?

If I remember correctly, and Satya will correct me if I'm wrong, but It stated in the Specs, that when Sessions migrate servers, that you cannot guarantee which JVM those listeners will fire. More to the point, it stated that the Listener may fire from a different JVM then where you are.
I think that that is important when you want listeners in a distributed environment.
Mark
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!