This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Impact in a distributed environment

 
Jimmy Chiu
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don’t quite understand the “quizlet” on page 89 (the famous SCWCD exam kit), could some explain it in more detailes?
Q: Your web application uses a ServletContextListener to page support personnel whenever it goes down. What would be the impact on this functionality if the web application were deployed in a distributed environment?
A: There will be no impact on this functionality. Because an instance of ServletContext will be created on all the servers, the support personnel will be paged whenever any instance is destroyed.
My question:
If “… changes to the ServletContext in one JVM may not trigger a method call on a ServletContextListener or a ServletContextAttributeListener in another JVM…”, how could no impact happen in the question?
Thanks,
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this at the SCWCD Exam Study Kit Author's online forum:
original question behavior in distributable environment -- Michael Ciaccio (08/07/02 20:27)
The quizlet, section 6.4.1, p89, indicates the contextDestroyed method
of the ServletContextListener class will work in a distributed environment.
However choice D, question 8 at the end of the chapter suggests the developer
cannot depend on ServletContext created / destroyed notification.
I may have missed something, clarification certainly appreciated.
Thank you in advance for your help.

Re: behavior in distributable environment -- Hanumant Deshmukh (08/08/02 07:21)

Hi Michael,
Both the are correct. In the quizlet, you are depending only on the
contextDestroyed() method, which will be called whenever the context in any of
the related JVMs is destroyed. You are not depending on the the contents of a
ServletContext, which is what you should not depend on because context on
different JVMs may have different data. So, if you add an attribute in a
context in one JVM, it will not be visible on the context for the same
application on another JVM.
Hanumant.

[ March 20, 2003: Message edited by: Jessica Sant ]
 
Jimmy Chiu
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jessica,
Thank you for heading me to the very right direction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic