• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

qustion about distribution

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are developing a web application which will be distibuted across multiple JVMs. Which of the following will you NOT do?
1.depend on sessionActivated/sessionPassivated mehtods to critical tasks
2.depend on url rewriting for implement session
3.depend on sendRedirect() to redirect a request
4.depend on attributes kept in Servletcontext
5.depend on attributs kept in a session
 
Jim Bedenbaugh
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Timber:
You are developing a web application which will be distibuted across multiple JVMs. Which of the following will you NOT do?
1.depend on sessionActivated/sessionPassivated mehtods to critical tasks
2.depend on url rewriting for implement session
3.depend on sendRedirect() to redirect a request
4.depend on attributes kept in Servletcontext
5.depend on attributs kept in a session

I will not do number 4 - because the app is distributed across multiple JVM's and each has it's own ServletContext. If I set an attribute on one ServletContext on one JVM, it will not be shared with the other ServletContexts on the other JVM's.
Number 1 is wrong because I can depend on Activation/Passivation if an app is spread across multiple JVM's. Actually, you depend on Activation/Passivation for just this kind of situation.
Number 2 is wrong because I can depend on URL rewriting - multiple JVM's is not relevant here.
Number 3 is wrong because sendRedirect() still works just fine with multiple JVM's.
Number 5 is wrong because session objects only run on one JVM anyway, so whether or not the app runs across multiple JVM's isn't relevant.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Timber
You might not have noticed but your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic